diff --git a/.woodpecker/nightly.yml b/.woodpecker/nightly.yml index ed1bac0e4..caa4416f6 100644 --- a/.woodpecker/nightly.yml +++ b/.woodpecker/nightly.yml @@ -5,6 +5,21 @@ clone: partial: false 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: image: codeberg.org/freeyourgadget/android-fdroid-tools:latest commands: