Skip to content

Commit

Permalink
Move version management into a variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinChartier committed Jul 14, 2019
1 parent 9775d87 commit 18ced4c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

go install --ldflags "-X main.version=$(git describe --abbrev=0 --tags)"
1 change: 0 additions & 1 deletion build/buildkitd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion commands/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
Expand Down

0 comments on commit 18ced4c

Please sign in to comment.