github.com/badrootd/nibiru-cometbft@v0.37.5-0.20240307173500-2a75559eee9b/DOCKER/build.sh (about) 1 #!/usr/bin/env bash 2 set -e 3 4 # Get the tag from the version, or try to figure it out. 5 if [ -z "$TAG" ]; then 6 TAG=$(awk -F\" '/TMCoreSemVer =/ { print $2; exit }' < ../version/version.go) 7 fi 8 if [ -z "$TAG" ]; then 9 echo "Please specify a tag." 10 exit 1 11 fi 12 13 TAG_NO_PATCH=${TAG%.*} 14 15 read -p "==> Build 3 docker images with the following tags (latest, $TAG, $TAG_NO_PATCH)? y/n" -n 1 -r 16 echo 17 if [[ $REPLY =~ ^[Yy]$ ]] 18 then 19 docker build \ 20 -t "cometbft/cometbft" \ 21 -t "cometbft/cometbft:$TAG" \ 22 -t "cometbft/cometbft:$TAG_NO_PATCH" . 23 fi