Skip to content

Commit

Permalink
1.7.6: fix master branch check in older git
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Oct 25, 2019
1 parent 860d6cf commit e72d238
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions bump.nim
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,15 @@ proc run*(exe: string; args: varargs[string]): bool =

proc appearsToBeMasterBranch*(): Option[bool] =
## try to determine if we're on the `master` branch
let
var
caught = capture("git", @["branch", "--show-current"])
if not caught.ok:
return
result = caught.output.contains(re"(*ANYCRLF)(?m)(?x)^master$").some
caught = capture("git", @["branch"])
if not caught.ok:
return
result = caught.output.contains(re"(*ANYCRLF)(?m)(?x)^\*\smaster$").some
else:
result = caught.output.contains(re"(*ANYCRLF)(?m)(?x)^master$").some
debug &"appears to be master branch? {result.get}"

proc fetchTagList*(): Option[string] =
Expand Down
2 changes: 1 addition & 1 deletion bump.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "1.7.5"
version = "1.7.6"
author = "disruptek"
description = "a tiny tool to bump nimble versions"
license = "MIT"
Expand Down

0 comments on commit e72d238

Please sign in to comment.