From 3b0609a28ebcb41613f1b6b4182f0ccc7b4554a3 Mon Sep 17 00:00:00 2001 From: Charles Blake Date: Mon, 10 Jul 2023 05:05:24 -0400 Subject: [PATCH] Make `git commit -m` more specific to just the `.nimble` file to avoid sweeping up unintended changes in the commit. Could maybe make the old behavior optional if anyone asks for it.. Also, consistently use "Error" rather than "error". --- nrel.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nrel.nim b/nrel.nim index bf059d8..bcd8175 100644 --- a/nrel.nim +++ b/nrel.nim @@ -96,11 +96,12 @@ proc nrel(vsn="", bump=patch, upDeps=false, msg="", stage=push, title="", let msg = if msg.len != 0: msg else: "Bump versions pre-release" let newV = nimbleUp(vsn, bump, upDeps, dryRun) if stage == nimble: quit() - run "git commit -am \'" & msg & "\'", "error committing version bump",5,dryRun + run "git commit -m \'" & msg & "\' " & nimblePath(), + "Error committing version bump",5,dryRun if stage == commit: quit() - run "git tag " & newV, "error adding " & newV & " tag", 6, dryRun + run "git tag " & newV, "Error adding " & newV & " tag", 6, dryRun if stage == tag: quit() - run "git push; git push --tags", "error pushing to main GH branch", 7, dryRun + run "git push; git push --tags", "Error pushing to main GH branch", 7, dryRun if stage == push: quit() run "gh release create \'"&newV&"\' -t '"&title&"' -F '"&rNotes&"'", "Error running gh release create; Manually do it on github", 8, dryRun