From 3273fce044f06f90ae296f9b42431958d2b06e7f Mon Sep 17 00:00:00 2001 From: bep Date: Wed, 18 Mar 2015 12:23:13 +0100 Subject: Refactor Hugo version Put version handling into the helpers package so it can be used by many, and split version and suffix to make it possible to calculate the next Hugo version. --- hugolib/hugo.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hugolib/hugo.go') diff --git a/hugolib/hugo.go b/hugolib/hugo.go index 17ca1c237..da08b93b9 100644 --- a/hugolib/hugo.go +++ b/hugolib/hugo.go @@ -1,11 +1,11 @@ package hugolib import ( + "fmt" + "github.com/spf13/hugo/helpers" "html/template" ) -const Version = "0.14-DEV" - var ( CommitHash string BuildDate string @@ -23,9 +23,9 @@ type HugoInfo struct { func init() { hugoInfo = &HugoInfo{ - Version: Version, + Version: helpers.HugoVersion(), CommitHash: CommitHash, BuildDate: BuildDate, - Generator: ``, + Generator: template.HTML(fmt.Sprintf(``, helpers.HugoVersion())), } } -- cgit v1.2.3