diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2021-03-29 12:42:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 12:42:34 +0200 |
commit | ab57e7f244fb44fbd283de1fcb16c9c9a6fece42 (patch) | |
tree | 6fcda303ff5f2ed5349e3400f34767116955ec7f /koch.nim | |
parent | e45b1e3f36f2c4778967410137bb87b8691e6c8c (diff) | |
download | Nim-ab57e7f244fb44fbd283de1fcb16c9c9a6fece42.tar.gz |
added a simple 'koch branchdone' command to speed up my workflow (#17563)
Diffstat (limited to 'koch.nim')
-rw-r--r-- | koch.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/koch.nim b/koch.nim index 6f1da8165..3b00d3564 100644 --- a/koch.nim +++ b/koch.nim @@ -664,6 +664,13 @@ proc showHelp() = quit(HelpText % [VersionAsString & spaces(44-len(VersionAsString)), CompileDate, CompileTime], QuitSuccess) +proc branchDone() = + let thisBranch = execProcess("git symbolic-ref --short HEAD").strip() + if thisBranch != "devel" and thisBranch != "": + exec("git checkout devel") + exec("git branch -D " & thisBranch) + exec("git pull --rebase") + when isMainModule: var op = initOptParser() var @@ -722,6 +729,7 @@ when isMainModule: let suffix = if latest: HeadHash else: FusionStableHash exec("nimble install -y fusion@$#" % suffix) of "ic": icTest(op.cmdLineRest) + of "branchdone": branchDone() else: showHelp() break of cmdEnd: break |