diff --git a/DOCKER/build.sh b/DOCKER/build.sh index d001ad68a..7fdc92c29 100755 --- a/DOCKER/build.sh +++ b/DOCKER/build.sh @@ -1,13 +1,9 @@ #!/usr/bin/env bash set -e -# Get the tag from the version, or try to figure it out. if [ -z "$TAG" ]; then - TAG=$(awk -F\" '/Version =/ { print $2; exit }' < ../version/version.go) -fi -if [ -z "$TAG" ]; then - echo "Please specify a tag." - exit 1 + echo "Please specify a tag." + exit 1 fi TAG_NO_PATCH=${TAG%.*} @@ -16,5 +12,5 @@ read -p "==> Build 3 docker images with the following tags (latest, $TAG, $TAG_N echo if [[ $REPLY =~ ^[Yy]$ ]] then - docker build -t "ostracon/ostracon" -t "ostracon/ostracon:$TAG" -t "ostracon/ostracon:$TAG_NO_PATCH" . + docker build -t "ostracon/ostracon" -t "ostracon/ostracon:$TAG" -t "ostracon/ostracon:$TAG_NO_PATCH" -f ./Dockerfile ../ fi diff --git a/DOCKER/push.sh b/DOCKER/push.sh index c421a2bb0..e18b06bca 100755 --- a/DOCKER/push.sh +++ b/DOCKER/push.sh @@ -1,13 +1,9 @@ #!/usr/bin/env bash set -e -# Get the tag from the version, or try to figure it out. if [ -z "$TAG" ]; then - TAG=$(awk -F\" '/Version =/ { print $2; exit }' < ../version/version.go) -fi -if [ -z "$TAG" ]; then - echo "Please specify a tag." - exit 1 + echo "Please specify a tag." + exit 1 fi TAG_NO_PATCH=${TAG%.*} diff --git a/scripts/dist.sh b/scripts/dist.sh index 298042fd4..bd3251726 100755 --- a/scripts/dist.sh +++ b/scripts/dist.sh @@ -4,13 +4,9 @@ set -e # WARN: non hermetic build (people must run this script inside docker to # produce deterministic binaries). -# Get the version from the environment, or try to figure it out. -if [ -z $VERSION ]; then - VERSION=$(awk -F\" '/Version =/ { print $2; exit }' < version/version.go) -fi if [ -z "$VERSION" ]; then - echo "Please specify a version." - exit 1 + echo "Please specify a version." + exit 1 fi echo "==> Building version $VERSION..." @@ -19,8 +15,6 @@ echo "==> Removing old directory..." rm -rf build/pkg mkdir -p build/pkg -# Get the git commit -VERSION := "$(git describe --always)" GIT_IMPORT="github.com/line/ostracon/version" # Determine the arch/os combos we're building for @@ -61,7 +55,7 @@ done rm -rf ./build/dist mkdir -p ./build/dist for FILENAME in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type f); do - FILENAME=$(basename "$FILENAME") + FILENAME=$(basename "$FILENAME") cp "./build/pkg/${FILENAME}" "./build/dist/ostracon_${VERSION}_${FILENAME}" done