diff --git a/.woodpecker/.build.yaml b/.woodpecker/.build.yaml index 60c67b4..15ac03f 100644 --- a/.woodpecker/.build.yaml +++ b/.woodpecker/.build.yaml @@ -8,9 +8,6 @@ steps: password: from_secret: REGISTRY_PASS repo: git.ar21.de/yolokube/grafana-backuper - platforms: - - linux/amd64 - - linux/arm64 tags: - latest - ${CI_PIPELINE_NUMBER} @@ -26,9 +23,6 @@ steps: password: from_secret: REGISTRY_PASS repo: git.ar21.de/yolokube/grafana-backuper - platforms: - - linux/amd64 - - linux/arm64 tags: - staging - staging-${CI_PIPELINE_NUMBER} diff --git a/internal/cmd/backup.go b/internal/cmd/backup.go index e147abd..e06c9fe 100644 --- a/internal/cmd/backup.go +++ b/internal/cmd/backup.go @@ -36,6 +36,8 @@ func NewBackupCommand(c *config.Config) *cobra.Command { } backupCmd.PersistentFlags().BoolVar(&c.ForceCommits, "force", false, "Force git commits / ignore existence check") + backupCmd.PersistentFlags().StringVar(&c.GitEmail, "git-email", "", "Git email address") + backupCmd.PersistentFlags().StringVar(&c.GPGKey, "signing-key", "", "Path to the GPG signing key") return backupCmd } diff --git a/internal/cmd/root.go b/internal/cmd/root.go index 1f83831..896dc8e 100644 --- a/internal/cmd/root.go +++ b/internal/cmd/root.go @@ -23,20 +23,6 @@ func NewRootCommand(c *config.Config) *cobra.Command { Short: "Grafana Backuper CLI", Long: "A command-line tool to back up and restore Grafana dashboards", Version: version.Version(), - RunE: func(cmd *cobra.Command, _ []string) error { - if len(c.Sequence) == 0 { - return cmd.Help() - } - - for _, command := range c.Sequence { - cmd.SetArgs([]string{command}) - if err := cmd.Execute(); err != nil { - return err - } - } - - return nil - }, PersistentPreRun: func(cmd *cobra.Command, _ []string) { initializeConfig(cmd) @@ -70,9 +56,6 @@ func NewRootCommand(c *config.Config) *cobra.Command { rootCmd.PersistentFlags().StringVar(&c.GitRepo, "git-repo", "", "Complete Git repository URL") rootCmd.PersistentFlags().StringVar(&c.GitUser, "git-user", "", "Git user name") rootCmd.PersistentFlags().StringVar(&c.GitPass, "git-pass", "", "Git user password") - rootCmd.PersistentFlags().StringVar(&c.GitEmail, "git-email", "", "Git email address") - rootCmd.PersistentFlags().StringVar(&c.GPGKey, "signing-key", "", "Path to the GPG signing key") - rootCmd.Flags().StringArrayVar(&c.Sequence, "sequence", nil, "Command sequence to execute multiple functions") return rootCmd } diff --git a/internal/config/config.go b/internal/config/config.go index f95cb6a..766f749 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -29,7 +29,6 @@ type Config struct { GitPass string GPGKey string Quiet bool - Sequence []string Output io.Writer Logger zerolog.Logger