Skip to content

Commit 6f93d8f

Browse files
authored
fix build flag (#937)
## What was changed Fixed the ldflags path in `.goreleaser.yml` to correctly set the CLI version at build time. **Before:** `-X github.com/temporalio/cli/internal.Version={{.Version}}` **After:** `-X github.com/temporalio/cli/internal/temporalcli.Version={{.Version}}` ## Why? The `Version` variable is defined in `internal/temporalcli/commands.go`, not `internal/`. The incorrect path meant the ldflags were targeting a non-existent variable, causing all released binaries to show `0.0.0-DEV` instead of the actual version. ## Checklist 1. How was this tested: - Built with `goreleaser build --snapshot --single-target` - Before fix: `temporal version 0.0.0-DEV (Server 1.30.0, UI 2.45.0)` - After fix: `temporal version 1.5.1-SNAPSHOT-31cf9eb (Server 1.30.0, UI 2.45.0)` 2. Any docs updates needed? - No
1 parent 24f7e67 commit 6f93d8f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ builds:
4242
dir: cmd/temporal
4343
binary: temporal
4444
ldflags:
45-
- -s -w -X github.com/temporalio/cli/internal.Version={{.Version}}
45+
- -s -w -X github.com/temporalio/cli/internal/temporalcli.Version={{.Version}}
4646
goarch:
4747
- amd64
4848
- arm64

0 commit comments

Comments
 (0)