1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-09-27 08:47:03 +02:00

Add CI filter to skip nightly if already released

This will cause the CI to produce a Failure if already released,
but it can prevent many unnecesary CI runs, which is prefferable.
We can remove this filter if the Failure is confussing.
This commit is contained in:
vanous 2023-08-12 12:40:14 +02:00
parent 13af55bd2e
commit f86cd39385

View File

@ -5,6 +5,21 @@ clone:
partial: false partial: false
steps: steps:
check-if-released:
image: codeberg.org/freeyourgadget/android-fdroid-tools:latest
commands: |
RELEASED_VERSION_CODE=$(curl https://freeyourgadget.codeberg.page/fdroid/repo/index-v1.json | jq '.packages."nodomain.freeyourgadget.gadgetbridge.nightly"[0].versionCode')
CURRENT_VERSION_CODE=$(git rev-list HEAD --count)
echo $CURRENT_VERSION_CODE
echo $RELEASED_VERSION_CODE
if [ "$RELEASED_VERSION_CODE" = "$CURRENT_VERSION_CODE" ]
then
echo "This version is already released, quit!"
return 1
fi
build-apks: build-apks:
image: codeberg.org/freeyourgadget/android-fdroid-tools:latest image: codeberg.org/freeyourgadget/android-fdroid-tools:latest
commands: commands: