diff --git a/.goreleaser.yml b/.goreleaser.yml index 6749829..4e09fee 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -86,7 +86,7 @@ brews: # Caveats for the user of your binary. # Default is empty. - caveats: "How to use this binary" + # caveats: "How to use this binary" # Your app's homepage. # Default is empty. @@ -112,8 +112,8 @@ brews: # ... # Packages your package depends on. - dependencies: - - name: git + #dependencies: + # - name: git # Packages that conflict with your package. #conflicts: diff --git a/a.MD b/a.MD index 1eae337..5a2621a 100644 --- a/a.MD +++ b/a.MD @@ -103,4 +103,9 @@ COMP_POINT=25 COMP_LINE="bit status" bitcomplete apt-get install language-pack-es locale -e -LC_ALL=es_MX.utf8 git status \ No newline at end of file +LC_ALL=es_MX.utf8 git status + + +https://github.com/chriswalz/bit/releases/download/v0.6.5/bit_0.6.5_Darwin_x86_64.tar.gz + +https://github.com/chriswalz/bit/releases/v0.6.5/bit_0.6.5_Darwin_x86_64.tar.gz \ No newline at end of file diff --git a/cmd/git.go b/cmd/git.go index cb038e8..b7b4ebb 100644 --- a/cmd/git.go +++ b/cmd/git.go @@ -173,7 +173,7 @@ func AllGitAliases() (cc []*cobra.Command) { return cc } -func printGitVersion() { +func PrintGitVersion() { msg, err := exec.Command("git", "--version").CombinedOutput() if err != nil { //fmt.Println(err) diff --git a/cmd/rootShell.go b/cmd/rootShell.go index 87c538f..446c551 100644 --- a/cmd/rootShell.go +++ b/cmd/rootShell.go @@ -13,7 +13,7 @@ import ( var ShellCmd = &cobra.Command{ Use: "bit", Short: "Bit is a Git CLI that predicts what you want to do", - Long: `v0.6.1`, + Long: `v0.6.6`, Run: func(cmd *cobra.Command, args []string) { completerSuggestionMap, bitCmdMap := CreateSuggestionMap(cmd) @@ -136,7 +136,7 @@ func GitCommandsPromptUsed(args []string, suggestionMap map[string][]prompt.Sugg // expected usage format // bit (checkout|switch|co) [-b] branch-name if args[len(args)-1] == "--version" { - fmt.Println("bit version v0.6.1") + fmt.Println("bit version v0.6.6") } if isBranchCompletionCommand(sub) { branchName := "" diff --git a/cmd/util.go b/cmd/util.go index df1ff35..a75ef8d 100644 --- a/cmd/util.go +++ b/cmd/util.go @@ -226,8 +226,8 @@ func HandleExit() { fmt.Println(v) fmt.Println(string(debug.Stack())) fmt.Println("OS:", runtime.GOOS, runtime.GOARCH) - fmt.Println("bit version v0.6.1") - printGitVersion() + fmt.Println("bit version v0.6.6") + PrintGitVersion() } } diff --git a/main.go b/main.go index 335a4c3..7eddbc7 100644 --- a/main.go +++ b/main.go @@ -34,6 +34,11 @@ func main() { // defer needed to handle funkyness with CTRL + C & go-prompt defer bitcmd.HandleExit() if !bitcmd.IsGitRepo() { + if len(os.Args) == 2 && os.Args[1] == "--version" { + fmt.Println("bit version v0.6.6") + bitcmd.PrintGitVersion() + return + } fmt.Println("fatal: not a git repository (or any of the parent directories): .git") return }