File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ gotrue-arm64
5
5
gotrue.exe
6
6
auth
7
7
auth-arm64
8
+ auth-arm64-strip
8
9
auth.exe
9
10
10
11
coverage.out
Original file line number Diff line number Diff line change 1
1
.PHONY : all build deps dev-deps image migrate test vet sec format unused
2
2
CHECK_FILES? =./...
3
3
4
- FLAGS =-ldflags "-X github.com/supabase/auth/internal/utilities.Version=` git describe --tags ` " -buildvcs=false
5
4
ifdef 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)
7
8
endif
8
9
10
+ FLAGS =-ldflags "-X github.com/supabase/auth/internal/utilities.Version=$(VERSION ) " -buildvcs=false
11
+
9
12
ifneq ($(shell docker compose version 2>/dev/null) ,)
10
13
DOCKER_COMPOSE =docker compose
11
14
else
@@ -23,7 +26,10 @@ build: deps ## Build the binary.
23
26
CGO_ENABLED=0 go build $(FLAGS )
24
27
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build $(FLAGS ) -o auth-arm64
25
28
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
+
27
33
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build \
28
34
$(FLAGS) -ldflags "-s -w" -o auth-arm64-strip
29
35
You can’t perform that action at this time.
0 commit comments