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

minor

parent 6cdc3865
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,16 @@ if [ "$PLATFORM" == "windows" ]; then ...@@ -61,7 +61,16 @@ if [ "$PLATFORM" == "windows" ]; then
$BIN_NAME = "${BIN_NAME}.exe" $BIN_NAME = "${BIN_NAME}.exe"
fi fi
# env GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -X main.appVersion=${PROG_VERSION} -X main.buildTime=${BUILDTIME}" .
env GOOS=$PLATFORM GOARCH=$ARCH 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
EXECUTABLE_PATH="${GOPATH}/bin/${PLATFORM}_${ARCH}/${BIN_NAME}" EXECUTABLE_PATH="${GOPATH}/bin/${PLATFORM}_${ARCH}/${BIN_NAME}"
[ -f $EXECUTABLE_PATH] || EXECUTABLE_PATH="${GOPATH}/bin//${BIN_NAME}"
run_upx() { run_upx() {
if ! which upx &>/dev/null; then if ! which upx &>/dev/null; then
...@@ -72,12 +81,6 @@ run_upx() { ...@@ -72,12 +81,6 @@ run_upx() {
upx --brute "$EXECUTABLE_PATH" upx --brute "$EXECUTABLE_PATH"
} }
# env GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -X main.appVersion=${PROG_VERSION} -X main.buildTime=${BUILDTIME}" .
env GOOS=$PLATFORM GOARCH=$ARCH 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
while true; do while true; do
echo -e "\nUPX degrades performances but in the case of acme-downloader it is not noticeable" echo -e "\nUPX degrades performances but in the case of acme-downloader it is not noticeable"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment