Skip to content

Commit 9633089

Browse files
committed
feat(plugin): Pin image version
1 parent 2b32816 commit 9633089

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ install-docker-plugin:
44

55
.PHONY: shellcheck
66
shellcheck:
7-
find . -type f \( -name "docker-pussh" -o -name "*.sh" \) -print0 | xargs -0 shellcheck;
7+
find . -path "./tmp" -prune -o -type f \( -name "docker-pussh" -o -name "*.sh" \) -print0 \
8+
| xargs -0 shellcheck -s bash;

docker-pussh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ if [[ "${UNREGISTRY_DEBUG:-}" == "1" ]]; then
55
set -x
66
fi
77

8+
# Script version
89
VERSION="0.1.3"
910

1011
# Return metadata expected by the Docker CLI plugin framework: https://github.com/docker/cli/pull/1564
@@ -20,7 +21,10 @@ EOF
2021
exit 0
2122
fi
2223

23-
UNREGISTRY_IMAGE=${UNREGISTRY_IMAGE:-ghcr.io/psviderski/unregistry:${VERSION}}
24+
# Pin the unregistry image version. The image doesn't change too often compared to the script,
25+
# so we want to avoid unnecessary pulls of the latest image version.
26+
UNREGISTRY_VERSION=0.1.3
27+
UNREGISTRY_IMAGE=${UNREGISTRY_IMAGE:-ghcr.io/psviderski/unregistry:${UNREGISTRY_VERSION}}
2428

2529
# Colors and symbols for output.
2630
RED='\033[0;31m'
@@ -287,6 +291,7 @@ while [ $# -gt 0 ]; do
287291
;;
288292
-v|--version)
289293
echo "docker-pussh, version ${VERSION}"
294+
echo "unregistry image: ${UNREGISTRY_IMAGE}"
290295
exit 0
291296
;;
292297
-*)

0 commit comments

Comments
 (0)