From 657bd781bf4095a78387525e641908872e2205e5 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Sat, 21 Nov 2020 17:04:05 -0500 Subject: Add some version information and a license. --- build.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 90ce8b1..7b515b5 100644 --- a/build.sh +++ b/build.sh @@ -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 -- cgit v1.2.3