File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,20 +4,20 @@ git_tag=$1
4
4
docker_tag=edge
5
5
6
6
git_commit=$( git rev-parse HEAD)
7
- commit_tag=$( git describe --exact-match ${git_commit} 2> /dev/null)
7
+ commit_tag=$( git describe --exact-match " ${git_commit} " 2> /dev/null)
8
8
9
- if [[ ${commit_tag} == ${git_tag} ]]; then
9
+ if [[ ${commit_tag} == " ${git_tag} " ]]; then
10
10
# we're on the exact commit of the tag, use the docker image for the tag
11
11
docker_tag=${git_tag// v/ }
12
- echo ${docker_tag}
12
+ echo " ${docker_tag} "
13
13
exit 0
14
14
15
15
else
16
16
# we're on a random commit, pull the 'edge' docker image to compare commits
17
17
# if it's the latest commit from 'main' the SHA will match the 'revision' of the 'edge' docker image
18
18
docker pull nginx/nginx-ingress:${docker_tag} > /dev/null 2>&1
19
19
DOCKER_SHA=$( docker inspect --format ' {{ index .Config.Labels "org.opencontainers.image.revision" }}' nginx/nginx-ingress:${docker_tag} )
20
- if [[ ${DOCKER_SHA} == ${git_commit} ]]; then
20
+ if [[ ${DOCKER_SHA} == " ${git_commit} " ]]; then
21
21
# we're on the same commit as the latest edge
22
22
echo ${docker_tag}
23
23
exit 0
You can’t perform that action at this time.
0 commit comments