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

minor

parent 6cdc3865
Branches
Tags
No related merge requests found
......@@ -61,7 +61,16 @@ if [ "$PLATFORM" == "windows" ]; then
$BIN_NAME = "${BIN_NAME}.exe"
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}"
[ -f $EXECUTABLE_PATH] || EXECUTABLE_PATH="${GOPATH}/bin//${BIN_NAME}"
run_upx() {
if ! which upx &>/dev/null; then
......@@ -72,12 +81,6 @@ run_upx() {
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
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