Skip to content

Commit 42262b0

Browse files
Further improve jsonlint version decision logic in Docker Hub build hook
1 parent 8946936 commit 42262b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hooks/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
if [ "latest" = "$DOCKER_TAG" ]; then
3+
if [ "latest" = "$DOCKER_TAG" ] && [ "master" = "$SOURCE_BRANCH" ]; then
44
JSONLINT_VERSION=$(curl https://registry.npmjs.org/jsonlint -sLo- | grep -Po '"latest":"\d+\.\d+\.\d+"' | awk -F'"' '{print $4}')
55
else
66
JSONLINT_VERSION="$SOURCE_BRANCH"

0 commit comments

Comments
 (0)