aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2024-02-02 12:29:13 +0100
committerToni Uhlig <matzeton@googlemail.com>2024-02-02 12:29:13 +0100
commit6fbe71418c5d27fc382bd2ccf339285ac2b024df (patch)
tree6a6baec417ae10a9dc197c5ff905962e1d65e2f5
parent6360f3edd2a30aadfd197f8caaa6682979643ad6 (diff)
Updated build script.buildscript
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-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