Skip to content

Commit

Permalink
Improve manpage generation. Move VERSION to dedicated file
Browse files Browse the repository at this point in the history
  • Loading branch information
Necoro committed Oct 4, 2023
1 parent ed6b1a0 commit d200944
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.4.0
9 changes: 7 additions & 2 deletions build_man.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#!/bin/sh
#!/bin/bash

txt2man -p MANUAL.txt > arch-log.1
txt2man \
-t arch-log \
-v arch-log \
-r arch-log-$(<VERSION) \
-s 1 \
MANUAL.txt > arch-log.1
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
_ "embed"
"errors"
"fmt"
"os"
Expand All @@ -12,7 +13,9 @@ import (
"github.com/Necoro/arch-log/pkg/log"
)

const VERSION = "0.4.0"
//go:embed VERSION
var VERSION string

const PROG_NAME = "arch-log"

var versionMsg = PROG_NAME + " v" + VERSION
Expand Down

0 comments on commit d200944

Please sign in to comment.