Skip to content

Commit 740363f

Browse files
committed
Add a version flag
This should automatically be configured by goreleaser
1 parent da518f3 commit 740363f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

main.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,18 @@ import (
1010
"github.com/GitJournal/git-auto-sync/common"
1111
)
1212

13+
var version = "dev"
14+
1315
func main() {
16+
cli.VersionFlag = &cli.BoolFlag{
17+
Name: "version",
18+
Aliases: []string{"V"},
19+
Usage: "Print only the version",
20+
}
21+
1422
app := &cli.App{
1523
Name: "git-auto-sync",
24+
Version: version,
1625
Usage: "Automatically Sync any Git Repo",
1726
EnableBashCompletion: true,
1827
Commands: []*cli.Command{

todo.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,3 @@ Commands -
3434
* Allow running the 'sync' command from a non top level directory
3535

3636
* Add a merge strategy where it doesn't take the YAML header changes into account
37-
* Add a version common

0 commit comments

Comments
 (0)