Skip to content

Commit

Permalink
0.6.7: gittyupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Jan 3, 2020
1 parent 1be555e commit 3ed6a14
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
6 changes: 3 additions & 3 deletions nimph.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.6.6"
version = "0.6.7"
author = "disruptek"
description = "nim package handler from the future"
license = "MIT"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/nimph/dependency.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 10 additions & 7 deletions src/nimph/project.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/tgit.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3ed6a14

Please sign in to comment.