Increment the current Taskfile version to 2.2

This commit is contained in:
Andrey Nering
2018-10-13 18:25:40 -03:00
parent f519f56078
commit 5d9de14ca3
3 changed files with 30 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ var (
v2 = mustVersion("2")
v21 = mustVersion("2.1")
v22 = mustVersion("2.2")
v23 = mustVersion("2.3")
)
// IsV1 returns if is a given Taskfile version is version 1
@@ -31,6 +32,11 @@ func IsV22(v *semver.Constraints) bool {
return v.Check(v22)
}
// IsV23 returns if is a given Taskfile version is at least version 2.3
func IsV23(v *semver.Constraints) bool {
return v.Check(v23)
}
func mustVersion(s string) *semver.Version {
v, err := semver.NewVersion(s)
if err != nil {