From ba7c03e54fb2db498b9c95460c5d67af2b136483 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sat, 21 Aug 2021 20:20:54 -0400 Subject: Remove binary. Add build.sh and LICENSE --- build.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 build.sh (limited to 'build.sh') diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..eea4a15 --- /dev/null +++ b/build.sh @@ -0,0 +1,21 @@ +#!/bin/sh +set -e + +LICENSE="$(cat LICENSE)" + +version="$(git log --format="%h %d" -1) +$(go version) +Build Date: $(date +%m.%d.%Y) +Source code can be found here: +https://git.riedstra.dev/mitch/paste/about + +$LICENSE" + +if ! git diff-index --quiet HEAD ; then + version="dirty: $version" +fi + +export CGO_ENABLED=0 + +go build -ldflags="-X 'main.Version=$version'" -o paste . +go build -ldflags="-X 'main.Version=$version'" -o paste-client ./client -- cgit v1.2.3