mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 12:14:49 +00:00
Merge pull request #20 from VonC/version
Make sure hugo --version prints the version and does *nothing* else.
This commit is contained in:
commit
6a5e4b363a
1 file changed
+5
-4
@@ -60,6 +60,11 @@ func main() {
|
||||
usage()
|
||||
}
|
||||
|
||||
if *version {
|
||||
fmt.Println("Hugo Static Site Generator v0.8")
|
||||
return
|
||||
}
|
||||
|
||||
config := hugolib.SetupConfig(cfgfile, source)
|
||||
config.BuildDrafts = *draft
|
||||
config.UglyUrls = *uglyUrls
|
||||
@@ -75,10 +80,6 @@ func main() {
|
||||
config.PublishDir = *destination
|
||||
}
|
||||
|
||||
if *version {
|
||||
fmt.Println("Hugo Static Site Generator v0.8")
|
||||
}
|
||||
|
||||
if *cpuprofile != 0 {
|
||||
f, err := os.Create("/tmp/hugo-cpuprofile")
|
||||
|
||||
|
||||
Reference in new issue
Block a user