Skip to content

Commit

Permalink
0.6.16: gittyupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Jan 16, 2020
1 parent a4cadad commit ffb6821
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions nimph.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.6.15"
version = "0.6.16"
author = "disruptek"
description = "nim package handler from the future"
license = "MIT"
Expand All @@ -9,7 +9,7 @@ requires "bump >= 1.8.18"
requires "npeg >= 0.21.3"
requires "https://github.com/disruptek/results"
requires "https://github.com/disruptek/cutelog >= 1.1.0"
requires "https://github.com/disruptek/gittyup >= 2.1.9"
requires "https://github.com/disruptek/gittyup >= 2.1.11"
requires "https://github.com/stefantalpalaru/nim-unittest2 >= 0.0.1"

# fixup a dependency: regex 0.10.0 doesn't build with 1.0.4 stdlib
Expand Down
1 change: 1 addition & 0 deletions src/nimph.nim.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# specify our preferred version of libgit2
--define:git2SetVer:"master"
#--define:git2SetVer:"05c1fb8a593c6aeb3869822ccc5cd551ba56d87f"
#--define:git2SetVer:"v0.28.4"

# and our preferred method of retrieval
Expand Down
11 changes: 5 additions & 6 deletions src/nimph/project.nim
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ proc clone*(project: var Project; url: Uri; name: string;
# clone the bare url into the given directory, yielding a repository object
repository := clone(bare, directory):
# or, if there was a problem, dump some error messages and bail out
error code.dumpError
error &"unable to clone into `{directory}`: {code.dumpError}"
return

# make sure the project we find is in the directory we cloned to;
Expand Down Expand Up @@ -1239,11 +1239,11 @@ proc setHeadToRelease*(project: var Project; release: Release): bool =
let code = repository.checkoutTree(release.reference)
case code:
of grcOk:
debug &"roll {project.name} to {release}"
result = true
# make sure we invalidate some data
project.dump = nil
project.version = (0'u, 0'u, 0'u)
debug &"roll {project.name} to {release}"
else:
debug &"roll {project.name} to {release}: {code}"
debug code.dumpError
Expand Down Expand Up @@ -1296,7 +1296,7 @@ proc versionChangingCommits*(project: var Project): VersionTags =
project.returnToHeadAfter:
block:
repository := openRepository(project.gitDir):
error code.dumpError
error &"unable to open repo at `{project.repo}`: {code.dumpError}"
break
# iterate over commits to the dotNimble file
for thing in repository.commitsForSpec(@[package]):
Expand All @@ -1306,9 +1306,8 @@ proc versionChangingCommits*(project: var Project): VersionTags =
# compose a new release to the commit and then go there
let release = newRelease($thing.get.oid, operator = Tag)
if not project.setHeadToRelease(release):
# free this thing because we couldn't travel there,
# so we cannot very well determine its version
free thing.get
# we couldn't travel there, so we cannot very well
# determine its version
continue
# freshen project version, release, etc.
project.refresh
Expand Down

0 comments on commit ffb6821

Please sign in to comment.