From 456474cfd281726e9188d4e0968bae38478900aa Mon Sep 17 00:00:00 2001 From: Steve Youngs Date: Fri, 7 Feb 2025 00:00:52 +0000 Subject: [PATCH] Add a build-number input to the AIO workflow When DEV_VERSION is not True, set the appbuild to build-number --- .github/workflows/windows-aio.yml | 8 ++++++-- aio/build.sh | 10 +++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-aio.yml b/.github/workflows/windows-aio.yml index 8d2372c3489..66d8a40edd7 100644 --- a/.github/workflows/windows-aio.yml +++ b/.github/workflows/windows-aio.yml @@ -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: @@ -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 diff --git a/aio/build.sh b/aio/build.sh index a042f2012b9..59a3fffea84 100644 --- a/aio/build.sh +++ b/aio/build.sh @@ -2,6 +2,10 @@ # # Assumption: script is executed from the 'aio' directory # +# arguments: build.sh +# 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 \ @@ -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