Fix build script

This commit is contained in:
Siegfried Siegert 2020-09-05 07:49:21 +02:00
parent 4cf22e75c4
commit 12098aec70

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
TARGET=mqttListener APP=mqttListener
# expand PATH for go tools # expand PATH for go tools
export PATH=$PATH:~/go/bin export PATH=$PATH:~/go/bin
@ -35,13 +35,13 @@ usage() {
build_linux_amd64() { build_linux_amd64() {
echo -e "\nBuilding for Linux amd64:" echo -e "\nBuilding for Linux amd64:"
env GOOS=linux GOARCH=amd64 go build ${GO_BUILD_OPTIONS} -ldflags "$(govvv -flags)" -o ${TARGET}-linux-amd64 env GOOS=linux GOARCH=amd64 go build ${GO_BUILD_OPTIONS} -ldflags "$(govvv -flags)" -o ${APP}-linux-amd64
echo -e "\t\t${GREEN}... done${NC}" echo -e "\t\t${GREEN}... done${NC}"
} }
build_linux_arm() { build_linux_arm() {
echo -e "\nBuilding for arm:" echo -e "\nBuilding for arm:"
env GOOS=linux GOARCH=arm go build ${GO_BUILD_OPTIONS} -ldflags "$(govvv -flags)" -o ${TARGET}-linux-arm env GOOS=linux GOARCH=arm go build ${GO_BUILD_OPTIONS} -ldflags "$(govvv -flags)" -o ${APP}-linux-arm
echo -e "\t\t${GREEN}... done${NC}" echo -e "\t\t${GREEN}... done${NC}"
echo -e "\nstipping arm binary:" echo -e "\nstipping arm binary:"