From 41fd17b637e8cad736364f7e2df7b903e9590d01 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Sat, 18 May 2024 15:52:06 +0300 Subject: [PATCH] Try to avoid building the snaps from branches not having snap-related changes, except for merges (when HEAD is the v0.6 tip). --- .buildbot/snap/build.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.buildbot/snap/build.sh b/.buildbot/snap/build.sh index 5d65a745..3a83ade7 100755 --- a/.buildbot/snap/build.sh +++ b/.buildbot/snap/build.sh @@ -1,5 +1,12 @@ #!/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 popd