Skip to content

Commit

Permalink
Merge pull request #47 from magodo/ver_in_pipeline
Browse files Browse the repository at this point in the history
Set version in build pipeline
  • Loading branch information
ms-henglu authored Mar 28, 2022
2 parents 360ec60 + 0847ac4 commit 16a3c20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
output=aztfy.exe
fi
GOOS="${OS}" GOARCH="${ARCH}" CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o $output
GOOS="${OS}" GOARCH="${ARCH}" CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X 'main.version=${VERSION}'" -o $output
pkg="aztfy_${VERSION}_${OS}_${ARCH}.zip"
zip $pkg $output
rm $output
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

var version string = "v0.0.8"
var version string = "dev"

0 comments on commit 16a3c20

Please sign in to comment.