Skip to content

Commit

Permalink
updating build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanejohnson committed Jul 1, 2023
1 parent 638b703 commit dc5aacf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ for GOOS in "${GOOSES[@]}"; do
fi
FILENAME="${NAME}_${RELEASE}_${GOOS}_${GOARCH}${SUFFIX}"
echo building "${FILENAME}"
GOOS=${GOOS} GOARCH=${GOARCH} CGO_ENABLED=0 go build -o "${FILENAME}"
GOOS=${GOOS} GOARCH=${GOARCH} CGO_ENABLED=0 go build -o "${FILENAME}" -ldflags "-X main.version=${RELEASE}"
done
done

3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import (
"github.com/nathanejohnson/whichca/cmd"
)

var version = ""

func main() {
log := logpkg.New(os.Stdout, "", 0)
version := ""
bi, ok := debug.ReadBuildInfo()
if ok {
version = bi.Main.Version
Expand Down

0 comments on commit dc5aacf

Please sign in to comment.