Skip to content
Snippets Groups Projects
Unverified Commit 4b7649c1 authored by Max Adamo's avatar Max Adamo
Browse files

minor

parent da1afd96
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#if ! which upx &>/dev/null; then
# echo "please download upx here https://github.com/upx/upx/releases"
# echo "and store the executable within your \$PATH"
# exit
#fi
BIN_NAME=acme-downloader
PATH=$PATH:$(go env GOPATH)/bin
GOPATH=$(go env GOPATH)
......@@ -14,6 +9,15 @@ export BIN_NAME PATH GOPATH
PROG_VERSION="1.0"
BUILDTIME=$(date -u '+%Y-%m-%d_%H:%M:%S')
run_upx() {
if ! which upx &>/dev/null; then
echo "please download upx here https://github.com/upx/upx/releases"
echo "and store the executable within your \$PATH"
exit
fi
upx --brute ${GOPATH}/bin/${BIN_NAME}
}
rm -rf ${GOPATH}/src/github.com/maxadamo/${BIN_NAME} ${GOPATH}/src/gitlab.geant.net/devops/${BIN_NAME}
go get -ldflags "-s -w -X main.appVersion=${PROG_VERSION} -X main.buildTime=${BUILDTIME}" gitlab.geant.net/devops/${BIN_NAME}
#go get -ldflags "-s -w -X main.appVersion=${PROG_VERSION} -X main.buildTime=${BUILDTIME}" .
......@@ -27,7 +31,7 @@ while true; do
case $yn in
[Yy]*)
echo ""
upx --brute ${GOPATH}/bin/${BIN_NAME}
run_upx
break
;;
[Nn]*) break ;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment