Skip to content

Commit

Permalink
1.8.1: sanity check current version parse
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Oct 30, 2019
1 parent 79c42c6 commit 7672221
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions bump.nim
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,14 @@ proc bump*(minor = false; major = false; patch = true; release = false;
# make a subtle edit to the version string and write it out
writer.writeLine next.withCrazySpaces(line)

# for sanity, make sure we were able to parse the previous version
if last.isNone:
crash &"couldn't find a version statement in `{target}`"

# and check again to be certain that our next version is valid
if not next.isValid:
crash &"unable to calculate the next version; `{next}` invalid"

# move to the repo so we can do git operations
debug "changing directory to", target.repo
setCurrentDir(target.repo)
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.8.0"
version = "1.8.1"
author = "disruptek"
description = "a tiny tool to bump nimble versions"
license = "MIT"
Expand Down

0 comments on commit 7672221

Please sign in to comment.