You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
1.2 KiB

#!/bin/bash
# build backend
VERSION="1.2.1"
export OLD_GOOS=$(go env GOOS)
export OLD_GOARCH=$(go env GOARCH)
mkdir bin
# buid for macos x86 64-bit
export GOOS=darwin
export GOARCH=amd64
mkdir bin/$(go env GOOS)-$(go env GOARCH)
cp .env.example ./bin/$(go env GOOS)-$(go env GOARCH)/.env.example
cp -r ./assets ./bin/$(go env GOOS)-$(go env GOARCH)
go build -o ./bin/$(go env GOOS)-$(go env GOARCH)/eleutheriapay-$VERSION-$(go env GOOS)-$(go env GOARCH)
$(go env GOPATH)/bin/rice append --exec ./bin/$(go env GOOS)-$(go env GOARCH)/eleutheriapay-$VERSION-$(go env GOOS)-$(go env GOARCH)
tar -czvf ./bin/$(go env GOOS)-$(go env GOARCH).tar.gz ./bin/$(go env GOOS)-$(go env GOARCH)
# buid for linux x86 64-bit
export GOOS=linux
export GOARCH=amd64
mkdir bin/$(go env GOOS)-$(go env GOARCH)
cp .env.example ./bin/$(go env GOOS)-$(go env GOARCH)/.env.example
cp -r ./assets ./bin/$(go env GOOS)-$(go env GOARCH)
go build -o ./bin/$(go env GOOS)-$(go env GOARCH)/eleutheriapay-$VERSION-$(go env GOOS)-$(go env GOARCH)
$(go env GOPATH)/bin/rice append --exec ./bin/$(go env GOOS)-$(go env GOARCH)/eleutheriapay-$VERSION-$(go env GOOS)-$(go env GOARCH)
tar -czvf ./bin/$(go env GOOS)-$(go env GOARCH).tar.gz ./bin/$(go env GOOS)-$(go env GOARCH)