Skip to content

Commit

Permalink
Changed to follow Cobra convention for version flag on cli
Browse files Browse the repository at this point in the history
To get the version you now have to use `--version` flag instead of the `version` sub-command.

Fixes: #12
  • Loading branch information
Tom committed Aug 13, 2018
1 parent 889a113 commit ad30f6e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
mkdir output
go build -v -o TechTestApp .
ls
./TechTestApp version | sed -e 's/Version: /v./' > versionfile
./TechTestApp --version | sed -e 's/TechTestApp version /v./' > versionfile
- run:
Expand Down
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ var rootCmd = &cobra.Command{
This application is used as part of testing potential candiates at Vibrato.
Please visit http://vibrato.com.au for more details`,
Version: "0.3.1",
}

// Execute adds all child commands to the root command and sets flags appropriately.
Expand Down
41 changes: 0 additions & 41 deletions cmd/version.go

This file was deleted.

2 changes: 1 addition & 1 deletion doc/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Continuous integration is managed through circleci and the build on the master b

Releases are deployed and managed through github, it's an automated process that is executed through the CI solution

To create a new release, update `../cmd/version.go` with the new version and merge that into the master branch.
To create a new release, update `../cmd/root.go` with the new version and merge that into the master branch.

The commit message on the merge, will be the release message, so make sure it contains the release notes.

Expand Down

0 comments on commit ad30f6e

Please sign in to comment.