03b1cf763d
* Batch-move everything
* go mod tidy
* make drone
* Remove genversions
* Bump alpine image
* Revert back pkg/build/docker/build.go
* Make sure correct enterprise branch is checked out
* Add enterprise2 version
* Remove extensions
* Bump build container
* backport node 18 test fix
(cherry picked from commit 4ff03fdbfb)
* Update scripts/drone
* Add more commands
* Fix starlark link
* Copy .drone.star
* Add drone target branch for custom events
---------
34 lines
820 B
Go
34 lines
820 B
Go
// Package verifystorybook contains the sub-command "verify-storybook".
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"path/filepath"
|
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
"github.com/grafana/grafana/pkg/infra/fs"
|
|
)
|
|
|
|
// VerifyStorybook Action implements the sub-command "verify-storybook".
|
|
func VerifyStorybook(c *cli.Context) error {
|
|
const grafanaDir = "."
|
|
|
|
paths := []string{
|
|
"packages/grafana-ui/dist/storybook/index.html",
|
|
"packages/grafana-ui/dist/storybook/iframe.html"}
|
|
for _, p := range paths {
|
|
exists, err := fs.Exists(filepath.Join(grafanaDir, p))
|
|
if err != nil {
|
|
return cli.Exit(fmt.Sprintf("failed to verify Storybook build: %s", err), 1)
|
|
}
|
|
if !exists {
|
|
return fmt.Errorf("failed to verify Storybook build, missing %q", p)
|
|
}
|
|
}
|
|
|
|
log.Printf("Successfully verified Storybook integrity")
|
|
return nil
|
|
}
|