general cleanup
Some checks failed
Build and publish the docker image / build (push) Failing after 1m8s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn
2025-01-19 12:29:05 +03:00
parent 9e307b7da4
commit 7cea387f02
27 changed files with 94 additions and 535 deletions

View File

@ -1,14 +1,15 @@
VERSION=`git rev-parse --short HEAD`
CGO_ENABLED=1
gentempl:
command -v templ &> /dev/null || go install github.com/a-h/templ/cmd/templ@latest
esbuild:
[ ! -f ./esbuild ] && curl -fsSL https://esbuild.github.io/dl/latest | sh
build:gentempl esbuild
all:
templ generate
cat ./style/*.css | ./esbuild --loader=css --minify > ./static/style.css
go build -ldflags="-X 'github.com/rramiachraf/dumb/data.Version=$(VERSION)' -s -w"
cat ./style/*.css > ./static/style.css
CGO_ENABLED=$(CGO_ENABLED) go build
test:
go test ./... -v
fmt:
format:
gofmt -s -w .
templ fmt .
.PHONY: test format