Skip to content

Commit

Permalink
Merge pull request #221 from threefoldtech/development_integration_ad…
Browse files Browse the repository at this point in the history
…d_version

add version flag to griddriver
  • Loading branch information
MarioBassem authored Oct 1, 2024
2 parents 5f8e5d8 + f03f2c2 commit f8889df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion griddriver/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fi


go env -w CGO_ENABLED="0"
go build -o ~/go/bin/griddriver
go build -ldflags="-X 'main.version=$(git describe --tags --abbrev=0)'" -o ~/go/bin/griddriver .
echo build ok

sudo cp ~/go/bin/griddriver /usr/local/bin
Binary file added griddriver/griddriver
Binary file not shown.
8 changes: 5 additions & 3 deletions griddriver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ import (
"github.com/urfave/cli"
)

var version string

func main() {
log.SetOutput(io.Discard)
zerolog.SetGlobalLevel(zerolog.Disabled)

app := &cli.App{
Name: "grid",
Usage: "Example: grid [COMMAND]",
Name: "griddriver",
Usage: "Example: grid [COMMAND]",
Version: version,
Commands: []cli.Command{
{
Name: "new-node-cn",
Expand Down

0 comments on commit f8889df

Please sign in to comment.