diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 7970508d4..3791f55b5 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -159,8 +159,8 @@ parts: - qttools5-dev override-pull: | craftctl default - if [ ! -f latest-subsurface-buildnumber ]; then - git fetch --depth=1 https://github.com/subsurface/nightly-builds.git branch-for-$( git rev-parse HEAD ) + if [ ! -f latest-subsurface-buildnumber ] \ + && git fetch --depth=1 https://github.com/subsurface/nightly-builds.git branch-for-$( git rev-parse HEAD ); then git checkout FETCH_HEAD latest-subsurface-buildnumber # We succeeded getting the release version, allow publishing above `beta` craftctl set grade=stable