"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "common/hugo/version.go" between
hugo-0.80.0.tar.gz and hugo-0.81.0.tar.gz

About: Hugo is a static site generator that takes a source directory of Markdown files and templates and uses these as input to create a complete website (written in Go).

version.go  (hugo-0.80.0):version.go  (hugo-0.81.0)
skipping to change at line 130 skipping to change at line 130
// NextPatchLevel returns the next patch/bugfix Hugo version. // NextPatchLevel returns the next patch/bugfix Hugo version.
// This will be a patch increment on the previous Hugo version. // This will be a patch increment on the previous Hugo version.
func (v Version) NextPatchLevel(level int) Version { func (v Version) NextPatchLevel(level int) Version {
return Version{Number: v.Number - 0.01, PatchLevel: level} return Version{Number: v.Number - 0.01, PatchLevel: level}
} }
// BuildVersionString creates a version string. This is what you see when // BuildVersionString creates a version string. This is what you see when
// running "hugo version". // running "hugo version".
func BuildVersionString() string { func BuildVersionString() string {
program := "Hugo Static Site Generator" // program := "Hugo Static Site Generator"
program := "hugo"
version := "v" + CurrentVersion.String() version := "v" + CurrentVersion.String()
if commitHash != "" { if commitHash != "" {
version += "-" + strings.ToUpper(commitHash) version += "-" + strings.ToUpper(commitHash)
} }
if IsExtended { if IsExtended {
version += "/extended" version += "+extended"
} }
osArch := runtime.GOOS + "/" + runtime.GOARCH osArch := runtime.GOOS + "/" + runtime.GOARCH
date := buildDate date := buildDate
if date == "" { if date == "" {
date = "unknown" date = "unknown"
} }
return fmt.Sprintf("%s %s %s BuildDate: %s", program, version, osArch, da versionString := fmt.Sprintf("%s %s %s BuildDate=%s",
te) program, version, osArch, date)
if vendorInfo != "" {
versionString += " VendorInfo=" + vendorInfo
}
return versionString
} }
func version(version float32, patchVersion int, suffix string) string { func version(version float32, patchVersion int, suffix string) string {
if patchVersion > 0 || version > 0.53 { if patchVersion > 0 || version > 0.53 {
return fmt.Sprintf("%.2f.%d%s", version, patchVersion, suffix) return fmt.Sprintf("%.2f.%d%s", version, patchVersion, suffix)
} }
return fmt.Sprintf("%.2f%s", version, suffix) return fmt.Sprintf("%.2f%s", version, suffix)
} }
// CompareVersion compares the given version string or number against the // CompareVersion compares the given version string or number against the
 End of changes. 3 change blocks. 
4 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)