add var to store version tag & adjust Justfile

This commit is contained in:
6543 2022-06-14 19:29:09 +02:00
parent a92088f8e8
commit 79c836ffe5
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
4 changed files with 9 additions and 2 deletions

View file

@ -11,6 +11,9 @@ dev:
build:
CGO_ENABLED=0 go build -ldflags '-s -w' -v -o build/codeberg-pages-server ./
build-tag VERSION:
CGO_ENABLED=0 go build -ldflags '-s -w -X "codeberg.org/codeberg/pages/server/version.Version={{VERSION}}"' -v -o build/codeberg-pages-server ./
lint: tool-golangci tool-gofumpt
[ $(gofumpt -extra -l . | wc -l) != 0 ] && { echo 'code not formated'; exit 1; }; \
golangci-lint run --timeout 5m --build-tags integration