From b2056fbf48849e321389977e3fdbb0f5841822c4 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Sat, 14 Dec 2019 09:51:15 -0500 Subject: Tidy up the server command, pull the handlers into the page library. Convert to go modules. Add a build script and version to the command --- build.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 build.sh (limited to 'build.sh') diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..e8630f3 --- /dev/null +++ b/build.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -x +set -e + +version="$(git log --format="%h %d" -1)" + +if ! git diff-index --quiet HEAD ; then + version="dirty: $version" +fi + +go build -ldflags="-X 'main.VersionString=$version'" ./cmd/server -- cgit v1.2.3