Skip to content

Commit 86e5fbd

Browse files
committed
build: inline Go version extraction in build process
- Remove separate GO_VERSION environment export and inline go version extraction in build ldflags Signed-off-by: appleboy <[email protected]>
1 parent 366f49e commit 86e5fbd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.goreleaser.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
before:
22
hooks:
33
- go mod tidy
4-
- export GO_VERSION=$(go version | cut -d " " -f 3)
54

65
builds:
76
- env:
@@ -63,7 +62,7 @@ builds:
6362
- -X 'github.com/appleboy/CodeGPT/version.Version={{.Version}}'
6463
- -X 'github.com/appleboy/CodeGPT/version.BuildTime={{.Date}}'
6564
- -X 'github.com/appleboy/CodeGPT/version.GitCommit={{.FullCommit}}'
66-
- -X 'github.com/appleboy/CodeGPT/version.GoVersion={{.Env.GO_VERSION}}'
65+
- -X 'github.com/appleboy/CodeGPT/version.GoVersion=$(go version | cut -d " " -f 3)'
6766
- -X 'github.com/appleboy/CodeGPT/version.BuildOS={{.Os}}'
6867
- -X 'github.com/appleboy/CodeGPT/version.BuildArch={{.Arch}}'
6968
binary: >-

0 commit comments

Comments
 (0)