Set up Hugo release flow on CircleCI

This rewrites the release logic to use CircleCI 2.0 and its approve workflow in combination with the state of the release notes to determine what to do next.

Fixes #3779
This commit is contained in:
Bjørn Erik Pedersen
2017-09-10 17:14:02 +02:00
committed by GitHub
parent f4bf214137
commit d2249c5099
11 changed files with 197 additions and 86 deletions

View File

@@ -41,6 +41,10 @@ func (v HugoVersion) String() string {
// ParseHugoVersion parses a version string.
func ParseHugoVersion(s string) (HugoVersion, error) {
var vv HugoVersion
if strings.HasSuffix(s, "-test") {
vv.Suffix = "-test"
s = strings.TrimSuffix(s, "-test")
}
if strings.Contains(s, "DEV") {
return vv, errors.New("DEV versions not supported by parse")

View File

@@ -53,7 +53,7 @@ func TestCompareVersions(t *testing.T) {
func TestParseHugoVersion(t *testing.T) {
require.Equal(t, "0.25", MustParseHugoVersion("0.25").String())
require.Equal(t, "0.25.2", MustParseHugoVersion("0.25.2").String())
require.Equal(t, "0.25-test", MustParseHugoVersion("0.25-test").String())
_, err := ParseHugoVersion("0.25-DEV")
require.Error(t, err)
}