diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..d0c7e64 --- /dev/null +++ b/build.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +go install --ldflags "-X main.version=$(git describe --abbrev=0 --tags)" diff --git a/build/buildkitd.go b/build/buildkitd.go index 9f278a8..b8b481c 100644 --- a/build/buildkitd.go +++ b/build/buildkitd.go @@ -22,7 +22,6 @@ func waitBuildkitRunning() error { return err } err = llb.WriteTo(dt, &dummyImageData) - fmt.Printf("Data is: %d\n", len(dummyImageData.String())) if err != nil { return err } diff --git a/commands/deploy.go b/commands/deploy.go index 3cabaaa..d2c4fe9 100644 --- a/commands/deploy.go +++ b/commands/deploy.go @@ -183,7 +183,7 @@ func deployCommandAction(cliContext *cli.Context) error { } if _, err := os.Stat(folderIn); err != nil { - return cli.NewExitError(fmt.Sprintf("The input folder at %s could not be read. Does it exist? %s", folderIn, err.Error()), 1) + return cli.NewExitError(fmt.Sprintf("The input folder at %s could not be read. Does it exist? %s\nSee https://github.com/distributed-containers-inc/sanic-site for an example.", folderIn, err.Error()), 1) } err = os.MkdirAll(folderOut, 0750) if err != nil { diff --git a/main.go b/main.go index 7b4c2d2..9ab509f 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,10 @@ import ( "os" ) +//version is the version of this app. +//Use --ldflags '-X main.version=(...)' with go build to update. +var version = "master" + func main() { app := cli.NewApp() @@ -22,7 +26,7 @@ func main() { app.EnableBashCompletion = true - app.Version = "v1.2.8" + app.Version = version app.Usage = "build & deploy kubernetes monorepos" err := app.Run(os.Args)