mirror of
https://github.com/grafana/grafana.git
synced 2025-09-21 22:07:37 +08:00
Only provide version ot build-frontend-packages if it's a valid semver (has 2 digits) (#57808)
This commit is contained in:
@ -13,7 +13,11 @@ import (
|
|||||||
func BuildFrontendPackages(c *cli.Context) error {
|
func BuildFrontendPackages(c *cli.Context) error {
|
||||||
version := ""
|
version := ""
|
||||||
if c.NArg() == 1 {
|
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)
|
cfg, mode, err := frontend.GetConfig(c, version)
|
||||||
|
Reference in New Issue
Block a user