mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-23 06:18:59 +00:00
35b35c5d67
close #82 close #32 make sure we dont get regressions again ... as we currently have in **main** followups: - create a DNS subdomayn specific to redirect to mock url ... Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/86 Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
30 lines
881 B
Makefile
30 lines
881 B
Makefile
dev:
|
|
#!/usr/bin/env bash
|
|
set -euxo pipefail
|
|
export ACME_API=https://acme.mock.directory
|
|
export ACME_ACCEPT_TERMS=true
|
|
export PAGES_DOMAIN=localhost.mock.directory
|
|
export RAW_DOMAIN=raw.localhost.mock.directory
|
|
export PORT=4430
|
|
go run . --verbose
|
|
|
|
build:
|
|
CGO_ENABLED=0 go build -ldflags '-s -w' -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
|
|
|
|
fmt: tool-gofumpt
|
|
gofumpt -w --extra .
|
|
|
|
tool-golangci:
|
|
@hash golangci-lint> /dev/null 2>&1; if [ $? -ne 0 ]; then \
|
|
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest; \
|
|
fi
|
|
|
|
tool-gofumpt:
|
|
@hash gofumpt> /dev/null 2>&1; if [ $? -ne 0 ]; then \
|
|
go install mvdan.cc/gofumpt@latest; \
|
|
fi
|