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

fixing tags

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