Skip to content

Commit

Permalink
fix: pass version correctly
Browse files Browse the repository at this point in the history
resolves #176
  • Loading branch information
JanDeDobbeleer committed Nov 20, 2020
1 parent 4bcd98c commit a73641d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -68,7 +68,7 @@ jobs:
uses: actions/checkout@v2
- name: Build
id: build
run: go build -o ${{ matrix.ARTIFACT }} -ldflags="-X 'main.version= ${{ needs.release.outputs.version }}'"
run: go build -o ${{ matrix.ARTIFACT }} -ldflags="-X 'main.Version=${{ needs.release.outputs.version }}'"
env:
GOARCH: "amd64"
- name: Hash
Expand Down
4 changes: 2 additions & 2 deletions main.go
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
)

var currentVersion = "development"
var Version = "development"

type args struct {
ErrorCode *int
Expand Down Expand Up @@ -70,7 +70,7 @@ func main() {
return
}
if *args.Version {
fmt.Println(currentVersion)
fmt.Println(Version)
return
}
colorWriter := &Renderer{
Expand Down

0 comments on commit a73641d

Please sign in to comment.