mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-08 23:40:40 +02:00
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.
This commit is contained in:
@@ -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: `<meta name="generator" content="Hugo ` + Version + `" />`,
|
||||
Generator: template.HTML(fmt.Sprintf(`<meta name="generator" content="Hugo %s" />`, helpers.HugoVersion())),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user