Skip to content
Snippets Groups Projects
Unverified Commit 30138c04 authored by Massimiliano Adamo's avatar Massimiliano Adamo
Browse files

fixing tags

parent fe93c054
Branches
Tags v1.0.7
No related merge requests found
Pipeline #29620 passed
...@@ -11,10 +11,9 @@ unset GOBIN ...@@ -11,10 +11,9 @@ unset GOBIN
BIN_NAME=acme-downloader BIN_NAME=acme-downloader
PATH=$PATH:$(go env GOPATH)/bin PATH=$PATH:$(go env GOPATH)/bin
GOPATH=$(go env GOPATH) GOPATH=$(go env GOPATH)
#PROG_VERSION="1.0"
BUILDTIME=$(date -u '+%Y-%m-%d_%H:%M:%S') BUILDTIME=$(date -u '+%Y-%m-%d_%H:%M:%S')
REPO_DIR=$(dirname $0) REPO_DIR=$(dirname $0)
if [ "$REPO_DIR" = '.' ]; then if [[ "$REPO_DIR" = '.' ]]; then
REPO_DIR=$(pwd) REPO_DIR=$(pwd)
fi fi
test -L "${GOPATH}/src/${REPO_DIR}" || ln -sf "$REPO_DIR" "${GOPATH}/src/" test -L "${GOPATH}/src/${REPO_DIR}" || ln -sf "$REPO_DIR" "${GOPATH}/src/"
...@@ -72,18 +71,18 @@ while true; do ...@@ -72,18 +71,18 @@ while true; do
shift shift
done done
if [ -z $VERSION ]; then if [[ -n $VERSION ]]; then
PROG_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1) | tr -d v) PROG_VERSION=$(echo $VERSION | tr -d v)
else else
PROG_VERSION=$(echo $PROG_VERSION | tr -d v) PROG_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1) | tr -d v)
fi fi
if [ -z $OS ] || [ -z $ARCH ]; then if [[ -z $OS ]] || [[ -z $ARCH ]]; then
echo -e "\nYou need to supply OS and Architecture\n" echo -e "\nYou need to supply OS and Architecture\n"
usage usage
fi fi
if [ "$OS" == "windows" ]; then if [[ "$OS" == "windows" ]]; then
BIN_NAME="${BIN_NAME}.exe" BIN_NAME="${BIN_NAME}.exe"
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment