diff options
Diffstat (limited to 'build.sh')
| -rw-r--r-- | build.sh | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -2,9 +2,15 @@ set -e set -x -if ! [ -d bin ] ; then - mkdir bin -fi +rm -rf bin +mkdir bin + +LICENSE="$(cat LICENSE)" +version="$(git log --format="%h %d" -1) +$(go version) +Build Date: $(date +%m.%d.%Y) + +$LICENSE" commands="cli web" @@ -12,10 +18,12 @@ for cmd in $commands ; do export GOOS=windows export GOARCH=amd64 -go build -o bin/steam-export-$cmd-$GOOS-$GOARCH.exe ./cmd/$cmd +go build -ldflags="-X 'main.Version=$version'"\ + -o bin/steam-export-$cmd-$GOOS-$GOARCH.exe ./cmd/$cmd export GOOS=linux export GOARCH=amd64 -go build -o bin/steam-export-$cmd-$GOOS-$GOARCH ./cmd/$cmd +go build -ldflags="-X 'main.Version=$version'"\ + -o bin/steam-export-$cmd-$GOOS-$GOARCH ./cmd/$cmd done |
