mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge pull request #20 from VonC/version
Make sure hugo --version prints the version and does *nothing* else.
This commit is contained in:
9
main.go
9
main.go
@@ -60,6 +60,11 @@ func main() {
|
|||||||
usage()
|
usage()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if *version {
|
||||||
|
fmt.Println("Hugo Static Site Generator v0.8")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
config := hugolib.SetupConfig(cfgfile, source)
|
config := hugolib.SetupConfig(cfgfile, source)
|
||||||
config.BuildDrafts = *draft
|
config.BuildDrafts = *draft
|
||||||
config.UglyUrls = *uglyUrls
|
config.UglyUrls = *uglyUrls
|
||||||
@@ -75,10 +80,6 @@ func main() {
|
|||||||
config.PublishDir = *destination
|
config.PublishDir = *destination
|
||||||
}
|
}
|
||||||
|
|
||||||
if *version {
|
|
||||||
fmt.Println("Hugo Static Site Generator v0.8")
|
|
||||||
}
|
|
||||||
|
|
||||||
if *cpuprofile != 0 {
|
if *cpuprofile != 0 {
|
||||||
f, err := os.Create("/tmp/hugo-cpuprofile")
|
f, err := os.Create("/tmp/hugo-cpuprofile")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user