mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Only provide version ot build-frontend-packages if it's a valid semver (has 2 digits) (#57808)
This commit is contained in:
parent
5edd511461
commit
fd16cad7da
@ -13,7 +13,11 @@ import (
|
||||
func BuildFrontendPackages(c *cli.Context) error {
|
||||
version := ""
|
||||
if c.NArg() == 1 {
|
||||
version = strings.TrimPrefix(c.Args().Get(0), "v")
|
||||
// Fixes scenario where an incompatible semver is provided to lerna, which will cause the step to fail.
|
||||
// When there is an invalid semver, a frontend package won't be published anyways.
|
||||
if strings.Count(version, ".") == 2 {
|
||||
version = strings.TrimPrefix(c.Args().Get(0), "v")
|
||||
}
|
||||
}
|
||||
|
||||
cfg, mode, err := frontend.GetConfig(c, version)
|
||||
|
Loading…
Reference in New Issue
Block a user