Skip to content

Commit 9ad80a0

Browse files
committed
chore: "set -e" instead of && all over the place
"set -e" means the shell will stop executing the script if a command fails, instead of moving to the next one. this means we don't need to concatenate commands with &&.
1 parent 21183e6 commit 9ad80a0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/approve-image.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#! /bin/bash
2+
set -e
23

34
# $1 is the version from package.json
45
# if semantic release chooses not to release (only chores for example)
@@ -10,8 +11,8 @@ else
1011
IMAGE_NAME_CANDIDATE=snyk/kubernetes-monitor:staging-candidate
1112
IMAGE_NAME_APPROVED=snyk/kubernetes-monitor:${1}-approved
1213

13-
docker pull ${IMAGE_NAME_CANDIDATE} &&
14-
docker tag ${IMAGE_NAME_CANDIDATE} ${IMAGE_NAME_APPROVED} &&
15-
docker push ${IMAGE_NAME_APPROVED} &&
14+
docker pull ${IMAGE_NAME_CANDIDATE}
15+
docker tag ${IMAGE_NAME_CANDIDATE} ${IMAGE_NAME_APPROVED}
16+
docker push ${IMAGE_NAME_APPROVED}
1617
./scripts/slack-notify-push.sh ${IMAGE_NAME_APPROVED}
1718
fi

0 commit comments

Comments
 (0)