mirror of
https://github.com/fiatjaf/nak.git
synced 2024-10-30 00:59:07 -04:00
support --version using -X
This commit is contained in:
parent
9bbc87b27a
commit
9d02301b2d
1
.github/workflows/release-cli.yml
vendored
1
.github/workflows/release-cli.yml
vendored
|
@ -40,6 +40,7 @@ jobs:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
goarch: ${{ matrix.goarch }}
|
goarch: ${{ matrix.goarch }}
|
||||||
|
ldflags: -X main.version=${{ github.ref }}
|
||||||
overwrite: true
|
overwrite: true
|
||||||
md5sum: false
|
md5sum: false
|
||||||
sha256sum: false
|
sha256sum: false
|
||||||
|
|
3
main.go
3
main.go
|
@ -7,6 +7,8 @@ import (
|
||||||
"github.com/fiatjaf/cli/v3"
|
"github.com/fiatjaf/cli/v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var version string = "debug"
|
||||||
|
|
||||||
var app = &cli.Command{
|
var app = &cli.Command{
|
||||||
Name: "nak",
|
Name: "nak",
|
||||||
Suggest: true,
|
Suggest: true,
|
||||||
|
@ -27,6 +29,7 @@ var app = &cli.Command{
|
||||||
bunker,
|
bunker,
|
||||||
serve,
|
serve,
|
||||||
},
|
},
|
||||||
|
Version: version,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "quiet",
|
Name: "quiet",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user