aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/build.sh b/build.sh
index 967d09e7..1bccbf42 100755
--- a/build.sh
+++ b/build.sh
@@ -1,15 +1,15 @@
#!/usr/bin/env sh
-GOBIN=go-1.14.1
-cd "$(dirname ${0})"
+if [ -z "${GOBIN}" ]; then
+ GOBIN=go
+fi
-${GOBIN} generate internal/assets/conf/conf.go
-${GOBIN} fmt internal/assets/conf/conf_gen.go
+cd "$(dirname ${0})"
-${GOBIN} generate internal/assets/templates/templates.go
-${GOBIN} fmt internal/assets/templates/templates_gen.go
+export GO111MODULE=on
-${GOBIN} generate internal/assets/public/public.go
-${GOBIN} fmt internal/assets/public/public_gen.go
+set -e
+set -x
-${GOBIN} build -ldflags='-s -w' -tags='sqlite pam'
+${GOBIN} mod download
+${GOBIN} build -ldflags='-s -w' -tags='sqlite pam' -o gogs