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
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

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