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

fix build.sh

parent 6b9d8e80
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,11 @@ BUILDTIME=$(date -u '+%Y-%m-%d_%H:%M:%S')
rm -rf ${GOPATH}/src/github.com/maxadamo/${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}" .
if [ $? -gt 0 ]; then
echo -e "\nthere was an error while compiling the code\n"
exit
fi
echo ""
while true; do
read -p "Do you wish to run upx against ${BIN_NAME}? (y/n) " yn
case $yn in
......@@ -24,14 +29,9 @@ while true; do
upx --brute ${GOPATH}/bin/${BIN_NAME}
break
;;
[Nn]*) exit ;;
[Nn]*) break ;;
*) echo "Please answer yes or no." ;;
esac
done
if [ $? -gt 0 ]; then
echo -e "\nthere was an error while compiling the code\n"
exit
fi
echo -e "\nthe binary was compiled and it is avilable as:\n - ${GOPATH}/bin/${BIN_NAME}\n"
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