Check if we're on main and change the version name accordingly if that's the case

This commit is contained in:
kolaente 2021-02-13 16:32:26 +01:00
parent 59092afbc0
commit ec7becd426
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 1 deletions

View File

@ -90,6 +90,10 @@ func setVersion() {
} else if os.Getenv("DRONE_BRANCH") != "" {
Version = strings.Replace(os.Getenv("DRONE_BRANCH"), "release/v", "", 1)
}
if Version == "main" {
Version = "unstable"
}
}
func setBinLocation() {
@ -447,7 +451,6 @@ type Release mg.Namespace
func (Release) Release(ctx context.Context) error {
mg.Deps(initVars)
mg.Deps(Release.Dirs)
mg.Deps(Release.Windows, Release.Linux, Release.Darwin)
// Run compiling in parallel to speed it up
errs, _ := errgroup.WithContext(ctx)