File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1
1
tmp
2
+ bin
2
3
templates
3
4
* .templ
Original file line number Diff line number Diff line change
1
+ Version := $(shell git describe --tags --dirty)
2
+ GitCommit := $(shell git rev-parse HEAD)
3
+ LDFLAGS := "-s -w -X main.Version=$(Version ) -X main.GitCommit=$(GitCommit ) "
4
+
5
+ .PHONY : all
6
+ all : gofmt vendor dist
7
+
8
+ .PHONY : gofmt
9
+ gofmt :
10
+ @test -z $(shell gofmt -l ./ | tee /dev/stderr) || (echo " [WARN] Fix formatting issues with 'make fmt'" && exit 1)
11
+
12
+ .PHONY : vendor
13
+ vendor :
14
+ go mod vendor
15
+
16
+ .PHONY : dist
17
+ dist :
18
+ mkdir -p bin/
19
+ CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -ldflags $(LDFLAGS ) -installsuffix cgo -o bin/templ-css-sort-amd64
20
+ CGO_ENABLED=0 GOOS=darwin go build -mod=vendor -a -ldflags $(LDFLAGS ) -installsuffix cgo -o bin/templ-css-sort-darwin
21
+ GOARM=7 GOARCH=arm CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -ldflags $(LDFLAGS ) -installsuffix cgo -o bin/templ-css-sort-arm
22
+ GOARCH=arm64 CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -ldflags $(LDFLAGS ) -installsuffix cgo -o bin/templ-css-sort-arm64
23
+ GOOS=windows CGO_ENABLED=0 go build -mod=vendor -a -ldflags $(LDFLAGS ) -installsuffix cgo -o bin/templ-css-sort.exe
24
+
25
+ test :
26
+ go test ./... -v -race
Original file line number Diff line number Diff line change
1
+ # github.com/a-h/templ v0.2.747
2
+ ## explicit; go 1.21
You can’t perform that action at this time.
0 commit comments