Build system: Fix Local Build Script for android.

Change the name of the `GITHUB_WORKSPACE` environment variable in the
android build script to `OUTPUT_DIR`, which is more intuitive when the
script is used for local builds.
Also test if the variable is defined before attempting to use it as the
target of the build output.

Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
Michael Keller 2023-12-18 16:05:46 +13:00
parent 733ffb787a
commit b3d2a8cdcb
2 changed files with 5 additions and 2 deletions

View file

@ -55,7 +55,7 @@ jobs:
apt-get install --reinstall cpp-7 gcc-7-base libgcc-7-dev libcc1-0 gcc-7
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
bash -x ./subsurface/packaging/android/qmake-build.sh
OUTPUT_DIR=$GITHUB_WORKSPACE bash -x ./subsurface/packaging/android/qmake-build.sh
- name: create version number
id: version_number

View file

@ -404,4 +404,7 @@ fi
# now build the Subsurface aab
make apk
mv $(find . -name Subsurface-mobile.apk) "$GITHUB_WORKSPACE"/Subsurface-mobile-"$CANONICALVERSION".apk
if [ -n "${OUTPUT_DIR+X}" ] ; then
mv $(find . -name Subsurface-mobile.apk) "$OUTPUT_DIR"/Subsurface-mobile-"$CANONICALVERSION".apk
fi