Skip to content

Commit dcbbd4b

Browse files
author
Gregor Gololicic
committed
fix ld
1 parent 81e1306 commit dcbbd4b

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/release.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ jobs:
2222
env:
2323
APP_VERSION: $(basename ${GITHUB_REF})
2424
VERSION: ${{github.ref_name}}
25+
FOO: "foo"
2526
with:
2627
github_token: ${{ secrets.GITHUB_TOKEN }}
2728
goos: ${{ matrix.goos }}
2829
goarch: ${{ matrix.goarch }}
2930
goversion: "1.19"
3031
project_path: "."
31-
ldflags: "-X github.com/sideninja/flow-cli/flow.semver=$(VERSION)"
32+
ldflags: "-X github.com/sideninja/flow-cli/flow.semver=$(VERSION) -X github.com/sideninja/flow-cli/flow.foo=$(FOO) -X github.com/sideninja/flow-cli/flow.boo=\"boo\""

flow.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ func init() {
1414
}
1515

1616
var version string
17+
var foo string
18+
var boo string
1719

1820
func main() {
1921

2022
APIURL := viper.GetString("APIURL")
2123

2224
gateway := gateway.CreateGateway(models.GRPC, APIURL)
23-
rootCmd := cmd.NewCmdRoot(gateway, version)
25+
rootCmd := cmd.NewCmdRoot(gateway, version+foo+boo)
2426

2527
if err := rootCmd.Execute(); err != nil {
2628
util.HandleError(err)

0 commit comments

Comments
 (0)