mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-02 23:20:20 +00:00
30efede730
In order to make it easier to see what's happening inside get-atomic-buildnr.sh write the result to a file that can be read by the caller. Not quite as elegant, but hopefully more practical to see what's going wrong when no new build number is created. Make sure that post-releasenotes is successfull by actually posting a release artifact (apparently the gh release action otherwise quietly fails). Try to ensure we find the Android APK when uploading to the release. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
26 lines
1.2 KiB
Bash
26 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
# this is intended to be used from within a GitHub action. Without the required
|
|
# token this will not work when run from the command line
|
|
# call it from the default position in the filesystem (which is inside the subsurface git tree)
|
|
#
|
|
# Usage: get-atomic-buildnr.sh SHA secrets.NIGHTLY_BUILDS [extra-name-component]
|
|
#
|
|
# the resulting release version is stored in the file ./release-version
|
|
|
|
# checkout the nightly-builds repo in parallel to the main repo
|
|
# the clone followed by the pointless push should verify that the password is stored in the config
|
|
# that way the script doesn't need the password
|
|
cd ..
|
|
url="https://subsurface:$2@github.com/subsurface/nightly-builds"
|
|
git clone -b main https://github.com/subsurface/nightly-builds
|
|
cd nightly-builds
|
|
git remote set-url origin "$url"
|
|
git push origin main
|
|
echo "build number prior to get-or-create was $(<latest-subsurface-buildnumber)"
|
|
cd ..
|
|
bash -x subsurface/scripts/get-or-create-build-nr.sh "$1" &> /dev/null
|
|
echo "build number after get-or-create is $(<subsurface/latest-subsurface-buildnumber)"
|
|
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
|
[[ -n $3 ]] && echo "$3" > subsurface/latest-subsurface-buildnumber-extension
|
|
bash subsurface/scripts/get-version > subsurface/release-version
|