Generate version during compilation

This commit is contained in:
世界 2023-03-09 16:53:25 +08:00
parent 325f6c71ff
commit 1c8a9e91b7
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
10 changed files with 83 additions and 33 deletions

View file

@ -10,7 +10,7 @@ builds:
gcflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags:
- -s -w -buildid=
- -X github.com/sagernet/sing-box/constant.Version={{ .Version }} -s -w -buildid=
tags:
- with_gvisor
- with_quic
@ -43,7 +43,7 @@ builds:
gcflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags:
- -s -w -buildid=
- -X github.com/sagernet/sing-box/constant.Version={{ .Version }} -s -w -buildid=
tags:
- with_gvisor
- with_quic