Skip to content

Commit

Permalink
Add a build-number input to the AIO workflow
Browse files Browse the repository at this point in the history
When DEV_VERSION is not True, set the appbuild to build-number
  • Loading branch information
stevenyoungs committed Feb 7, 2025
1 parent 8e53577 commit 456474c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/windows-aio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ name: Windows AIO
on:
workflow_dispatch:
inputs:
build-number:
description: 'Build number'
type: string
default: '1'
cleanup:
description: 'Cleanup python environment on completion?'
type: boolean
required: false
default: false

jobs:
build:

Expand All @@ -45,7 +49,7 @@ jobs:
- name: Build
run: |
cd aio
./build.sh ${{ inputs.cleanup }}
./build.sh ${{ inputs.cleanup }} ${{ inputs.build-number }}
- uses: actions/upload-artifact@v4
with:
name: GrampsAIO
Expand Down
10 changes: 9 additions & 1 deletion aio/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
#
# Assumption: script is executed from the 'aio' directory
#
# arguments: build.sh <cleanup> <build-number>
# clean-up : [true|false]. clean the python venv on completion
# build-number : string to use for appbuild if DEV_VERSION != True
#
# install prerequisites
## prerequisites in msys packages
pacman -S --needed --noconfirm \
Expand Down Expand Up @@ -142,7 +146,11 @@ cp /mingw64/share/icons/hicolor/scalable/places/*.svg /mingw64/share/icons/gnome
# build gramps
rm -rf dist aio/dist
python setup.py bdist_wheel
appbuild="r$(git rev-list --count HEAD)-$(git rev-parse --short HEAD)"
if `grep -q '^DEV_VERSION\s*=\s*True' gramps/version.py`; then
appbuild="r$(git rev-list --count HEAD)-$(git rev-parse --short HEAD)"
else
appbuild="$2"
fi
appversion=$(grep "^VERSION_TUPLE" gramps/version.py | sed 's/.*(//;s/, */\./g;s/).*//')
unzip -q -d aio/dist dist/*.whl
cd aio
Expand Down

0 comments on commit 456474c

Please sign in to comment.