mirror of
https://github.com/grafana/grafana.git
synced 2026-08-11 05:34:53 -05:00
CI: Allow other modules to register build sub-commands (#62741)
* Allow other modules to register build sub-commands * CI: Fix retries on artifacts-page clone * Fix linting errors * Fix golint issues * Update to grabpl 3.0.21
This commit is contained in:
@@ -52,4 +52,8 @@ var (
|
||||
EnvVars: []string{"GITHUB_TOKEN"},
|
||||
Usage: "GitHub token",
|
||||
}
|
||||
tagFlag = cli.StringFlag{
|
||||
Name: "tag",
|
||||
Usage: "Grafana version tag",
|
||||
}
|
||||
)
|
||||
|
||||
+12
-12
@@ -10,6 +10,13 @@ import (
|
||||
"github.com/grafana/grafana/pkg/build/docker"
|
||||
)
|
||||
|
||||
var additionalCommands []*cli.Command = make([]*cli.Command, 0, 5)
|
||||
|
||||
//nolint:unused
|
||||
func registerAppCommand(c *cli.Command) {
|
||||
additionalCommands = append(additionalCommands, c)
|
||||
}
|
||||
|
||||
func main() {
|
||||
app := cli.NewApp()
|
||||
app.Commands = cli.Commands{
|
||||
@@ -280,10 +287,7 @@ func main() {
|
||||
ArgsUsage: "[version]",
|
||||
Action: NpmReleaseAction,
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "tag",
|
||||
Usage: "Grafana version tag",
|
||||
},
|
||||
&tagFlag,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -291,10 +295,7 @@ func main() {
|
||||
Usage: "Store npm packages tarball",
|
||||
Action: NpmStoreAction,
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "tag",
|
||||
Usage: "Grafana version tag",
|
||||
},
|
||||
&tagFlag,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -302,10 +303,7 @@ func main() {
|
||||
Usage: "Retrieve npm packages tarball",
|
||||
Action: NpmRetrieveAction,
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "tag",
|
||||
Usage: "Grafana version tag",
|
||||
},
|
||||
&tagFlag,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -417,6 +415,8 @@ func main() {
|
||||
},
|
||||
}
|
||||
|
||||
app.Commands = append(app.Commands, additionalCommands...)
|
||||
|
||||
if err := app.Run(os.Args); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user