Skip to content

Commit

Permalink
fix: passing version from version tag
Browse files Browse the repository at this point in the history
By using the version tags we can choice when to build a new release. However the `ldflags` where not passed correctly.
  • Loading branch information
Nr18 committed Sep 19, 2023
1 parent fdefc9d commit 1b650f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ builds:
binary: aws-iam-user
goos: ["linux", "darwin", "windows"]
goarch: ["386", "amd64", "arm64"]
ldflags:
- -s -w -X "main.version={{.Version}}"
env:
- CGO_ENABLED=0

Expand Down
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package main

import "github.com/conijnio/aws-iam-user/cmd"
import (
"github.com/conijnio/aws-iam-user/cmd"
)

var (
version = "dev"
Expand Down

0 comments on commit 1b650f0

Please sign in to comment.