Skip to content

Commit

Permalink
0.1.1: handle 4-digit versions; fixes #62
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Dec 13, 2019
1 parent 13b2a4a commit d1872aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nimph.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.1.0"
version = "0.1.1"
author = "disruptek"
description = "nim package handler from the future"
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions src/nimph/project.nim
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ proc knowVersion*(project: var Project): Version =
if "version" in project.dump:
let
text {.used.} = project.dump["version"]
parsed = parseVersion(&"""version = "{text}"""")
parsed = parseVersionLoosely(text)
if parsed.isSome:
when defined(debug):
debug "parsed a version from `nimble dump`"
result = parsed.get
result = parsed.get.version
else:
let emsg = &"unparsable version `{text}` in {project.name}" # noqa
raise newException(IOError, emsg)
Expand Down

0 comments on commit d1872aa

Please sign in to comment.