Try to avoid building the snaps from branches not having snap-related changes,

except for merges (when HEAD is the v0.6 tip).
This commit is contained in:
Lee Miller 2024-05-18 15:52:06 +03:00
parent aaaac0f034
commit 41fd17b637
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -1,5 +1,12 @@
#!/bin/bash #!/bin/bash
git remote add -f upstream https://github.com/Bitmessage/PyBitmessage.git
HEAD="$(git rev-parse HEAD)"
UPSTREAM="$(git merge-base --fork-point upstream/v0.6)"
SNAP_DIFF="$(git diff upstream/v0.6 -- packages/snap .buildbot/snap)"
[ -z "${SNAP_DIFF}" ] && [ $HEAD != $UPSTREAM ] && exit 0
pushd packages && snapcraft || exit 1 pushd packages && snapcraft || exit 1
popd popd