Skip to content

Commit

Permalink
version 24.1.1
Browse files Browse the repository at this point in the history
* updated support for NVDA 2024.2.
* updated the release github workflow, to use the first header content as the release description.
  • Loading branch information
davidacm committed Jan 5, 2024
1 parent fd6b77d commit a314858
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 83 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/release-on-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
permissions:
contents: write
name: Upload on new tags
on:
push:
tags:
['*']
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- run: echo -e "scons\nmarkdown">requirements.txt
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: 'pip'
- name: Install dependencies
run: |
pip install scons markdown
sudo apt update
sudo apt install gettext
- name: Set add-on version from tag
run: |
import re
with open("buildVars.py", 'r+', encoding='utf-8') as f:
text = f.read()
version = "${{ github.ref }}".split("/")[-1]
text = re.sub('"addon_version" *:.*,', '"addon_version" : "%s",' % version, text)
f.seek(0)
f.write(text)
f.truncate()
shell: python

- name: Build add-on
run: scons
- name: load latest changes from changelog
run: awk '/^# / && !flag {flag=1; next} /^# / && flag {exit} flag && NF' changelog.md > newChanges.md
- name: Calculate sha256
run: sha256sum *.nvda-addon >> newChanges.md
- uses: actions/upload-artifact@v3
with:
name: packaged_addon
path: |
./*.nvda-addon
./newChanges.md
upload_release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: ["build"]
steps:
- name: download releases files
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R

- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: packaged_addon/newChanges.md
files: packaged_addon/*.nvda-addon
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}
71 changes: 0 additions & 71 deletions .github/workflows/upload-on-tag.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion addon/globalPlugins/headphoneFinder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: UTF-8 -*-
# Headphone Finder: """This add-on has two scripts, to beep to the left or the right, this can help you to find your bluetooth headphone.
# Copyright (C) 2023 David CM
# Copyright (C) 2023 - 2024 David CM
# Author: David CM <[email protected]>
# Released under GPL 2
#globalPlugins/headphoneFinder.py
Expand Down
4 changes: 2 additions & 2 deletions buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
"addon_description" : _("""This add-on has two scripts, to beep to the left or the right, this can help you to find your bluetooth headphone."""),
# version
"addon_version" : "0.1",
"addon_version" : "24.1.1",
# Author(s)
"addon_author" : u"David CM <[email protected]>",
# URL for the add-on documentation support
Expand All @@ -29,7 +29,7 @@
# Minimum NVDA version supported (e.g. "2018.3.0")
"addon_minimumNVDAVersion" : "2018.3.0",
# Last NVDA version supported/tested (e.g. "2018.4.0", ideally more recent than minimum version)
"addon_lastTestedNVDAVersion" : "2023.1.0",
"addon_lastTestedNVDAVersion" : "2024.2.0",
# Add-on update channel (default is stable or None)
"addon_updateChannel" : None,
# Add-on license such as GPL 2
Expand Down
9 changes: 7 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
## 0.1 version ##
The first version.
# version 24.1.1

* updated support for NVDA 2024.2.

# version 0.1

* The first version.
12 changes: 9 additions & 3 deletions sconstruct
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if env["dev"]:
buildDate = datetime.datetime.now()
year, month, day = str(buildDate.year), str(buildDate.month), str(buildDate.day)
versionTimestamp = "".join([year, month.zfill(2), day.zfill(2)])
env["addon_version"] = f"{versionTimestamp}-dev"
env["addon_version"] = f"{versionTimestamp}.0.0"
env["versionNumber"] = f"{versionTimestamp}.0.0"
env["channel"] = "dev"
elif env["version"] is not None:
Expand Down Expand Up @@ -170,7 +170,8 @@ def createAddonBundleFromPath(path, dest):
absPath = os.path.join(dir, filename)
if pathInBundle not in buildVars.excludedFiles:
z.write(absPath, pathInBundle)
createAddonStoreJson(dest)
# Add-on store does not require submitting json files.
# createAddonStoreJson(dest)
return dest


Expand Down Expand Up @@ -299,7 +300,12 @@ for file in pythonFiles:
createAddonHelp("addon")
for mdFile in env.Glob(os.path.join('addon', 'doc', '*', '*.md')):
htmlFile = env.markdown(mdFile)
env.Depends(htmlFile, mdFile)
try: # It is possible that no moFile was set, because an add-on has no translations.
moFile
except NameError: # Runs if there is no moFile
env.Depends(htmlFile, mdFile)
else: # Runs if there is a moFile
env.Depends(htmlFile, [mdFile, moFile])
env.Depends(addon, htmlFile)

# Pot target
Expand Down
4 changes: 0 additions & 4 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
@charset "utf-8";
body {
font-family : Verdana, Arial, Helvetica, Sans-serif;
color : #FFFFFF;
background-color : #000000;
line-height: 1.2em;
}
h1, h2 {text-align: center}
Expand All @@ -26,5 +24,3 @@ a { text-decoration : underline;
text-decoration : none;
}
a:focus, a:hover {outline: solid}
:link {color: #0000FF;
background-color: #FFFFFF}

0 comments on commit a314858

Please sign in to comment.