Skip to content

Commit

Permalink
fix(minor): version checking
Browse files Browse the repository at this point in the history
  • Loading branch information
LinceMathew committed Feb 20, 2024
1 parent 0581a91 commit 57bd7c2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions glee.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ var opts struct {
Debug bool `short:"d" long:"debug" description:"debug mode"`
File string `description:"Markdown file to process"`
Help bool `short:"h" long:"help" description:"Show this help message"`
Version bool `short:"v" long:"version" description:"Show version"`
}

var postsApiBase string
Expand Down Expand Up @@ -963,9 +964,16 @@ func getJWToken() (string, error) {

return signedToken, nil
}
var version string

func main() {
loadGlobalConfig()
if len(version) == 0 {
version = "vUnset"
}
if opts.Version{
fmt.Println(version)
}

parser := flags.NewParser(&opts, flags.Default)
parser.Usage = "Usage: glee <markdown_file_path>"
Expand Down

0 comments on commit 57bd7c2

Please sign in to comment.