From 3ed6a145de521e3c367bb567a035876ae8fec98e Mon Sep 17 00:00:00 2001 From: Andy Davidoff Date: Fri, 3 Jan 2020 18:27:23 -0500 Subject: [PATCH] 0.6.7: gittyupdate --- nimph.nimble | 6 +++--- src/nimph/dependency.nim | 2 +- src/nimph/project.nim | 17 ++++++++++------- tests/tgit.nim | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/nimph.nimble b/nimph.nimble index ce32b34..bc55e81 100644 --- a/nimph.nimble +++ b/nimph.nimble @@ -1,4 +1,4 @@ -version = "0.6.6" +version = "0.6.7" author = "disruptek" description = "nim package handler from the future" license = "MIT" @@ -8,8 +8,8 @@ requires "cligen >= 0.9.41" requires "bump >= 1.8.18" requires "npeg >= 0.21.3" requires "https://github.com/disruptek/cutelog >= 1.1.0" -requires "https://github.com/disruptek/gittyup >= 2.0.3" -requires "https://github.com/stefantalpalaru/nim-unittest2#30c7d332d8ebab28d3240018f48f145ff20af239" +requires "https://github.com/disruptek/gittyup >= 2.0.5" +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 requires "regex >= 0.11.0" diff --git a/src/nimph/dependency.nim b/src/nimph/dependency.nim index 7a2aaba..dae6209 100644 --- a/src/nimph/dependency.nim +++ b/src/nimph/dependency.nim @@ -152,7 +152,7 @@ proc peelRelease*(project: Project; release: Release): Release = break # else, open the repo - repository := openRepository(project.repo): + repository := openRepository(project.gitDir): error &"unable to open repo at `{project.repo}`: {code.dumpError}" break diff --git a/src/nimph/project.nim b/src/nimph/project.nim index a264976..f07cdc2 100644 --- a/src/nimph/project.nim +++ b/src/nimph/project.nim @@ -301,7 +301,7 @@ proc fetchTagTable*(project: var Project) = block: if project.dist != Git: break - repository := openRepository(project.repo): + repository := openRepository(project.gitDir): error &"unable to open repo at `{project.repo}`: {code.dumpError}" break let @@ -323,7 +323,7 @@ proc releaseSummary*(project: Project): string = else: # else, lookup the summary for the tag or commit block: - repository := openRepository(project.repo): + repository := openRepository(project.gitDir): error &"unable to open repo at `{project.repo}`: {code.dumpError}" break thing := repository.lookupThing(project.release.reference): @@ -479,7 +479,7 @@ proc findRepositoryUrl*(project: Project; name = defaultRemote): Option[Uri] = block complete: block found: - repository := openRepository(project.repo): + repository := openRepository(project.gitDir): error &"unable to open repo at `{project.repo}`: {code.dumpError}" break found let @@ -812,7 +812,7 @@ proc addMissingUpstreams*(project: Project) = grc: GitResultCode block: - repository := openRepository(project.repo): + repository := openRepository(project.gitDir): error &"unable to open repo at `{project.repo}`: {code.dumpError}" break @@ -999,7 +999,7 @@ proc promoteRemoteLike*(project: Project; url: Uri; name = defaultRemote): bool # we'll add missing upstreams after this block block donehere: - repository := openRepository(path): + repository := openRepository(project.gitDir): error &"unable to open repo at `{path}`: {code.dumpError}" break @@ -1102,7 +1102,7 @@ proc repoLockReady*(project: Project): bool = return block: - repository := openRepository(project.repo): + repository := openRepository(project.gitDir): error &"unable to open repo at `{project.repo}`: {code.dumpError}" break @@ -1280,7 +1280,7 @@ proc versionChangingCommits*(project: var Project): VersionTags = project.returnToHeadAfter: block: - repository := openRepository(project.repo): + repository := openRepository(project.gitDir): error code.dumpError break # iterate over commits to the dotNimble file @@ -1291,6 +1291,9 @@ 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 continue # freshen project version, release, etc. project.refresh diff --git a/tests/tgit.nim b/tests/tgit.nim index cbbf7f4..84dfad6 100644 --- a/tests/tgit.nim +++ b/tests/tgit.nim @@ -36,7 +36,7 @@ suite "git": cute = deps.projectForPath(path.get).get var - repository = openRepository(project.repo) + repository = openRepository(project.gitDir) teardown: free repository.get