Skip to content

Commit b0d91a1

Browse files
committed
1 parent 49a941c commit b0d91a1

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

ntangle.nimble

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Package
22

3-
version = "0.6.4"
3+
version = "0.6.5"
44
author = "Kaushal Modi"
55
description = "Command-line utility for Tangling of Org mode documents"
66
license = "MIT"
@@ -9,4 +9,4 @@ bin = @["ntangle"]
99

1010
# Dependencies
1111

12-
requires "nim >= 0.19.0", "cligen >= 0.9.18"
12+
requires "nim >= 0.19.6", "cligen >= 0.9.28"

src/ntangle.nim

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -516,18 +516,8 @@ proc doOrgTangle(file: string) =
516516
writeFiles()
517517
echo ""
518518

519-
proc echoVersion() =
520-
## Echo the version string.
521-
const
522-
versionString = staticExec("git describe --tags HEAD")
523-
echo fmt"ntangle {version_string}"
524-
525-
proc ntangle(orgFilesOrDirs: seq[string], version = false) =
519+
proc ntangle(orgFilesOrDirs: seq[string]) =
526520
## Command-line utility for Tangling of Org mode documents
527-
if version:
528-
echoVersion()
529-
quit QuitSuccess
530-
531521
startTime = cpuTime()
532522
try:
533523
for f1 in orgFilesOrDirs:
@@ -560,10 +550,13 @@ when isMainModule:
560550
if cmdLine.len == 0:
561551
result = @["--help"]
562552

563-
dispatch(ntangle
564-
, usage = "\nNAME\n ntangle - $doc\n" &
553+
const
554+
versionString = staticExec("git describe --tags HEAD")
555+
# https://github.com/c-blake/cligen/blob/master/RELEASE-NOTES.md#version-0928
556+
clCfg.version = versionString
557+
558+
dispatch(ntangle,
559+
usage = "\nNAME\n ntangle - $doc\n" &
565560
"USAGE\n $command $args\n\n" &
566561
"OPTIONS\n$options\n" &
567-
"URL\n " & url & "\n"
568-
, help = { "version": "write the version to stdout" }
569-
)
562+
"URL\n " & url & "\n")

0 commit comments

Comments
 (0)