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

add usage instructions

parent 30138c04
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
# #
# for windows and Mac check the README # you can choose your OS and Architecture as follows:
# ./build.sh --os=windows --arch=amd64
#
# or you can use --help to check a list of platforms and options
# #
if ! which go &>/dev/null; then if ! which go &>/dev/null; then
echo "Go is not installed or is not in \$PATH" echo "Go is not installed or is not in \$PATH"
echo "giving up..." echo "giving up..."
exit exit 1
fi fi
unset GOBIN unset GOBIN
BIN_NAME=acme-downloader BIN_NAME=acme-downloader
...@@ -86,7 +89,7 @@ if [[ "$OS" == "windows" ]]; then ...@@ -86,7 +89,7 @@ if [[ "$OS" == "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=$OS GOARCH=$ARCH go build -ldflags "-s -w -X main.appVersion=${PROG_VERSION} -X main.buildTime=${BUILDTIME}" .
env GOOS=$OS GOARCH=$ARCH go get -ldflags "-s -w -X main.appVersion=${PROG_VERSION} -X main.buildTime=${BUILDTIME}" . env GOOS=$OS GOARCH=$ARCH go get -ldflags "-s -w -X main.appVersion=${PROG_VERSION} -X main.buildTime=${BUILDTIME}" .
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
echo -e "\nthere was an error while compiling the code\n" echo -e "\nthere was an error while compiling the code\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment