From: spf13 Date: Tue, 9 Jul 2013 02:27:23 +0000 (-0400) Subject: Adding version number to command line options X-Git-Tag: v0.8~41 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=aee48725eb81feb62d86bdc0521387f142c9c3a0;p=brevno-suite%2Fhugo Adding version number to command line options --- diff --git a/main.go b/main.go index 3f4b6f96..857b8874 100644 --- a/main.go +++ b/main.go @@ -37,6 +37,7 @@ var ( help = flag.Bool("h", false, "show this help") path = flag.String("p", "", "filesystem path to read files relative from") verbose = flag.Bool("v", false, "verbose output") + version = flag.Bool("version", false, "which version of hugo") cpuprofile = flag.Int("cpuprofile", 0, "Number of times to create the site and profile it") watchMode = flag.Bool("w", false, "watch filesystem for changes and recreate as needed") server = flag.Bool("s", false, "run a (very) simple web server") @@ -65,6 +66,10 @@ func main() { config.BaseUrl = *baseUrl } + if *version { + fmt.Println("Hugo Static Site Generator v0.8") + } + if *cpuprofile != 0 { f, err := os.Create("/tmp/hugo-cpuprofile")