Skip to content

Commit 20f163e

Browse files
Also store release channel in snap-last-run-hash
If omitted, no snaps would be released to the stable channel
1 parent 98c3188 commit 20f163e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,12 @@ snap-bindist:
168168
- apt install git -y
169169
- touch snap-last-run-hash
170170
- |
171-
if [ "$(cat snap-last-run-hash)" == $(git rev-parse HEAD) ]; then
172-
echo "Already built and published $(git rev-parse HEAD). Nothing to do!";
171+
if [ "$(cat snap-last-run-hash)" == "$(git rev-parse HEAD)-${RELEASE_CHANNEL}" ]; then
172+
echo "Already built and published $(git rev-parse HEAD) on ${RELEASE_CHANNEL}. Nothing to do!";
173173
exit 0;
174174
fi
175175
- git rev-parse HEAD > snap-last-run-hash
176+
- echo "-${RELEASE_CHANNEL}" >> snap-last-run-hash
176177
- cd bindist/linux/snap
177178
- echo $SNAPCRAFT_LOGIN_FILE | base64 --decode --ignore-garbage > snapcraft.login
178179
- snapcraft login --with snapcraft.login

0 commit comments

Comments
 (0)