@@ -28,7 +28,7 @@ AVALANCHE_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd )
28
28
# Load the constants
29
29
source " $AVALANCHE_PATH " /scripts/constants.sh
30
30
31
- if [[ $current_branch == * " -race" ]]; then
31
+ if [[ $image_tag == * " -race" ]]; then
32
32
echo " Branch name must not end in '-race'"
33
33
exit 1
34
34
fi
74
74
DOCKER_CMD=" ${DOCKER_CMD} --load"
75
75
fi
76
76
77
- echo " Building Docker Image with tags: $DOCKER_IMAGE :$commit_hash , $DOCKER_IMAGE :$current_branch "
78
- ${DOCKER_CMD} -t " $DOCKER_IMAGE :$commit_hash " -t " $DOCKER_IMAGE :$current_branch " \
77
+ echo " Building Docker Image with tags: $DOCKER_IMAGE :$commit_hash , $DOCKER_IMAGE :$image_tag "
78
+ ${DOCKER_CMD} -t " $DOCKER_IMAGE :$commit_hash " -t " $DOCKER_IMAGE :$image_tag " \
79
79
" $AVALANCHE_PATH " -f " $AVALANCHE_PATH /Dockerfile"
80
80
81
- echo " Building Docker Image with tags: $DOCKER_IMAGE :$commit_hash -race , $DOCKER_IMAGE :$current_branch -race"
82
- ${DOCKER_CMD} --build-arg=" RACE_FLAG=-r" -t " $DOCKER_IMAGE :$commit_hash -race" -t " $DOCKER_IMAGE :$current_branch -race" \
81
+ echo " Building Docker Image with tags: $DOCKER_IMAGE :$commit_hash -race , $DOCKER_IMAGE :$image_tag -race"
82
+ ${DOCKER_CMD} --build-arg=" RACE_FLAG=-r" -t " $DOCKER_IMAGE :$commit_hash -race" -t " $DOCKER_IMAGE :$image_tag -race" \
83
83
" $AVALANCHE_PATH " -f " $AVALANCHE_PATH /Dockerfile"
84
84
85
85
# Only tag the latest image for the master branch when images are pushed to a registry
86
- if [[ " ${DOCKER_IMAGE} " == * " /" * && $current_branch == " master" ]]; then
86
+ if [[ " ${DOCKER_IMAGE} " == * " /" * && $image_tag == " master" ]]; then
87
87
echo " Tagging current avalanchego images as $DOCKER_IMAGE :latest"
88
88
docker buildx imagetools create -t " $DOCKER_IMAGE :latest" " $DOCKER_IMAGE :$commit_hash "
89
89
fi
0 commit comments