feat(pkg/build): replace lerna exec with yarn workspaces foreach

This commit is contained in:
Jack Westbrook
2025-03-03 11:43:00 +01:00
parent 353401617e
commit 0bff060af2
+1 -1
View File
@@ -26,7 +26,7 @@ func PackFrontendPackages(ctx context.Context, tag, grafanaDir, artifactsDir str
}
// nolint:gosec
cmd := exec.CommandContext(ctx, "yarn", "lerna", "exec", "--no-private", "--", "yarn", "pack", "--out", fmt.Sprintf("../../npm-artifacts/%%s-%v.tgz", tag))
cmd := exec.CommandContext(ctx, "yarn", "workspaces", "foreach", "--no-private", "--include='@grafana/*'", "-A", "exec", "yarn", "pack", "--out", fmt.Sprintf("../../npm-artifacts/%%s-%v.tgz", tag))
cmd.Dir = grafanaDir
if output, err := cmd.CombinedOutput(); err != nil {
return fmt.Errorf("command '%s' failed to run, output: %s, err: %q", cmd.String(), output, err)