blob: b4fe585aad6a3f681203826895597058a8622a55 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/sh
set -e
set -x
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
# cd ui
# npm install
# npm run build
# cd ..
go install github.com/swaggo/swag/cmd/swag@latest
swag init
export CGO_ENABLED=0
go build -ldflags="-X 'main.Version=$version'" .
|