File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ gotrue-arm64
55gotrue.exe
66auth
77auth-arm64
8+ auth-arm64-strip
89auth.exe
910
1011coverage.out
Original file line number Diff line number Diff line change 11.PHONY : all build deps dev-deps image migrate test vet sec format unused
22CHECK_FILES? =./...
33
4- FLAGS =-ldflags "-X github.com/supabase/auth/internal/utilities.Version=` git describe --tags ` " -buildvcs=false
54ifdef RELEASE_VERSION
6- FLAGS=-ldflags "-X github.com/supabase/auth/internal/utilities.Version=v$(RELEASE_VERSION)" -buildvcs=false
5+ VERSION=v$(RELEASE_VERSION)
6+ else
7+ VERSION=$(shell git describe --tags)
78endif
89
10+ FLAGS =-ldflags "-X github.com/supabase/auth/internal/utilities.Version=$(VERSION ) " -buildvcs=false
11+
912ifneq ($(shell docker compose version 2>/dev/null) ,)
1013 DOCKER_COMPOSE =docker compose
1114else
@@ -23,7 +26,10 @@ build: deps ## Build the binary.
2326 CGO_ENABLED=0 go build $(FLAGS )
2427 CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build $(FLAGS ) -o auth-arm64
2528
26- build-strip : deps # # Build a stripped binary.
29+ build-strip : deps # # Build a stripped binary, for which the version file needs to be rewritten.
30+ echo " package utilities" > internal/utilities/version.go
31+ echo " const Version = \" $( VERSION) \" " >> internal/utilities/version.go
32+
2733 CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build \
2834 $(FLAGS) -ldflags "-s -w" -o auth-arm64-strip
2935
You can’t perform that action at this time.
0 commit comments