Skip to content

Commit 37b6a47

Browse files
committed
add version info
1 parent 35e2a71 commit 37b6a47

File tree

2 files changed

+31
-7
lines changed

2 files changed

+31
-7
lines changed

bumpver.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[bumpver]
2+
current_version = "v23.0"
3+
version_pattern = "vYY.PATCH"
4+
commit_message = "bump version -> {new_version}"
5+
commit = true
6+
tag = true
7+
push = true
8+
9+
[bumpver.file_patterns]
10+
"webtex_render/main.go" = [
11+
'const VERSION = "{version}"',
12+
]
13+
"bumpver.toml" = [
14+
'current_version = "{version}"',
15+
]
16+

webtex_render/main.go

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,25 @@ import (
77
"text/template"
88
)
99

10+
const VERSION = "v23.0"
11+
1012
func main() {
1113
var config Config
12-
var inputFilename = flag.String("input", "-", "input file or - for stdin")
13-
var outputFilename = flag.String("output", "-", "output file or - for stdout")
14-
var equationDirectory = flag.String("eqdir", "equations", "directory to output equations")
15-
var inputUrl = flag.String("inurl", "eqn://", "input webtex URL prefix")
16-
var outputUrl = flag.String("outurl", "equations", "image src root")
17-
var templateFilename = flag.String("template", "", "TeX template file")
18-
var onlyInner = flag.Bool("innerhtml", false, "export only inner HTML of the result (without <html><body> tags)")
14+
inputFilename := flag.String("input", "-", "input file or - for stdin")
15+
outputFilename := flag.String("output", "-", "output file or - for stdout")
16+
equationDirectory := flag.String("eqdir", "equations", "directory to output equations")
17+
inputUrl := flag.String("inurl", "eqn://", "input webtex URL prefix")
18+
outputUrl := flag.String("outurl", "equations", "image src root")
19+
templateFilename := flag.String("template", "", "TeX template file")
20+
onlyInner := flag.Bool("innerhtml", false, "export only inner HTML of the result (without <html><body> tags)")
21+
version := flag.Bool("version", false, "prints current roxy version")
1922
flag.Parse()
2023

24+
if *version {
25+
log.Printf("WebTeX Render version %v\n", VERSION)
26+
os.Exit(0)
27+
}
28+
2129
var err error
2230
if *inputFilename == "-" {
2331
config.InputFile = os.Stdin

0 commit comments

Comments
 (0)