File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 2828 go-version : ${{ matrix.go_version }}
2929 cache : true
3030
31+ - name : Set version from tag
32+ run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
33+
3134 - name : Install Swag
3235 run : go install github.com/swaggo/swag/cmd/swag@latest
3336
4043 - name : Build Standard Platforms
4144 if : matrix.group == 'standard'
4245 run : |
43- LDFLAGS="-s -w -checklinkname=0"
46+ LDFLAGS="-s -w -checklinkname=0 -X server/version.Version=${{ env.VERSION }} "
4447 mkdir -p "${{ github.workspace }}/dist"
4548 cd server
4649
7578 run : |
7679 go run gen_web.go
7780
78- LDFLAGS="-s -w -checklinkname=0"
81+ LDFLAGS="-s -w -checklinkname=0 -X server/version.Version=${{ env.VERSION }} "
7982 mkdir -p "${{ github.workspace }}/dist"
8083 export NDK_TOOLCHAIN="$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64"
8184 cd server
Original file line number Diff line number Diff line change 55 "runtime/debug"
66)
77
8- const Version = "MatriX.140"
8+ // Version is set at build time via -ldflags "-X server/version.Version=<tag>"
9+ var Version = "MatriX.140"
910
1011func GetTorrentVersion () string {
1112 bi , ok := debug .ReadBuildInfo ()
You can’t perform that action at this time.
0 commit comments