summaryrefslogtreecommitdiffstats
path: root/helpers/hugo_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-04-13 16:59:05 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-04-24 11:08:56 +0200
commit7f6430d84d68765536b8758b1331a4b84db04c84 (patch)
tree7c2b1450c2d2789fbbc0323fc6027dac586ef6df /helpers/hugo_test.go
parent0e87b18b66d2c8ba9e2abc429630cb03f5b093d6 (diff)
Automate the Hugo release process
This commit adds a work flow aroung GoReleaser to get the Hugo release process automated and more uniform: * It can be run fully automated or in two steps to allow for manual edits of the relase notes. * It supports both patch and full releases. * It fetches author, issue, repo info. etc. for the release notes from GitHub. * The file names produced are mainly the same as before, but we no use tar.gz as archive for all Unix versions. * There isn't a fully automated CI setup in place yet, but the release tag is marked in the commit message with "[ci deploy]" Fixes #3358
Diffstat (limited to 'helpers/hugo_test.go')
-rw-r--r--helpers/hugo_test.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/helpers/hugo_test.go b/helpers/hugo_test.go
index b71517f71..c96a1351b 100644
--- a/helpers/hugo_test.go
+++ b/helpers/hugo_test.go
@@ -22,10 +22,14 @@ import (
func TestHugoVersion(t *testing.T) {
assert.Equal(t, "0.15-DEV", hugoVersion(0.15, 0, "-DEV"))
- assert.Equal(t, "0.17", hugoVersionNoSuffix(0.16+0.01, 0))
- assert.Equal(t, "0.20", hugoVersionNoSuffix(0.20, 0))
assert.Equal(t, "0.15.2-DEV", hugoVersion(0.15, 2, "-DEV"))
- assert.Equal(t, "0.17.3", hugoVersionNoSuffix(0.16+0.01, 3))
+
+ v := HugoVersion{Number: 0.21, PatchLevel: 0, Suffix: "-DEV"}
+
+ require.Equal(t, v.ReleaseVersion().String(), "0.21")
+ require.Equal(t, "0.21-DEV", v.String())
+ require.Equal(t, "0.22", v.Next().String())
+ require.Equal(t, "0.20.3", v.NextPatchLevel(3).String())
}
func TestCompareVersions(t *testing.T) {