Skip to content

Commit

Permalink
Merge pull request #82 from raspbeguy/fix-version
Browse files Browse the repository at this point in the history
fix(): make version a build-time injectable variable
  • Loading branch information
blind-oracle authored Dec 18, 2024
2 parents 1707bdd + bc37bbd commit a171980
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Build
run: |
go build ./...
go build -ldflags "-X main.Version=${{ github.ref }}" ./...
env:
CGO_ENABLED: 0

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.15.0
1.15.1
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

var (
version = "0.0.0"
Version string
)

func main() {
Expand Down Expand Up @@ -59,7 +59,7 @@ func main() {
}

log.Warnf("Listening on %s, sending to %s", cfg.Listen, cfg.Target)
log.Warnf("Started v%s", version)
log.Warnf("Started v%s", Version)

ch := make(chan os.Signal, 1)
signal.Notify(ch, syscall.SIGTERM, os.Interrupt)
Expand Down

0 comments on commit a171980

Please sign in to comment.