[v9.4.x] Bug: Fix build-frontend* config checks (#70076) (#70118)

Bug: Fix `build-frontend*` config checks (#70076)

* Fix frontend config checks

* Exclude test tag events

(cherry picked from commit 5a36fa5f8a)

# Conflicts:
#	pkg/build/cmd/buildfrontendpackages.go
This commit is contained in:
Dimitris Sotirakis
2023-06-15 09:44:30 +03:00
committed by GitHub
parent c1cddece45
commit c251570039
6 changed files with 66 additions and 61 deletions
+1 -2
View File
@@ -15,9 +15,8 @@ func BuildFrontend(c *cli.Context) error {
if err != nil {
return err
}
version := metadata.GrafanaVersion
cfg, mode, err := frontend.GetConfig(c, version)
cfg, mode, err := frontend.GetConfig(c, metadata)
if err != nil {
return err
}
+5 -9
View File
@@ -2,8 +2,8 @@ package main
import (
"log"
"strings"
"github.com/grafana/grafana/pkg/build/config"
"github.com/grafana/grafana/pkg/build/errutil"
"github.com/grafana/grafana/pkg/build/frontend"
"github.com/grafana/grafana/pkg/build/syncutil"
@@ -11,16 +11,12 @@ import (
)
func BuildFrontendPackages(c *cli.Context) error {
version := ""
if c.NArg() == 1 {
// 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")
}
metadata, err := config.GenerateMetadata(c)
if err != nil {
return err
}
cfg, mode, err := frontend.GetConfig(c, version)
cfg, mode, err := frontend.GetConfig(c, metadata)
if err != nil {
return err
}