• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / cli / 11810443631

13 Nov 2024 04:06AM UTC coverage: 59.649% (-0.09%) from 59.736%
11810443631

Pull #2875

github

sweatybridge
feat: support config push command
Pull Request #2875: feat: support config push command

5 of 29 new or added lines in 2 files covered. (17.24%)

2 existing lines in 1 file now uncovered.

6386 of 10706 relevant lines covered (59.65%)

6.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

38.46
/cmd/config.go
1
package cmd
2

3
import (
4
        "os"
5
        "os/signal"
6

7
        "github.com/spf13/afero"
8
        "github.com/spf13/cobra"
9
        "github.com/supabase/cli/internal/config/push"
10
        "github.com/supabase/cli/internal/utils/flags"
11
)
12

13
var (
14
        configCmd = &cobra.Command{
15
                GroupID: groupManagementAPI,
16
                Use:     "config",
17
                Short:   "Manage Supabase project configurations",
NEW
18
                PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
×
NEW
19
                        ctx, _ := signal.NotifyContext(cmd.Context(), os.Interrupt)
×
NEW
20
                        cmd.SetContext(ctx)
×
NEW
21
                        return cmd.Root().PersistentPreRunE(cmd, args)
×
NEW
22
                },
×
23
        }
24

25
        configPushCmd = &cobra.Command{
26
                Use:   "push",
27
                Short: "Pushes local config.toml to the linked project",
NEW
28
                RunE: func(cmd *cobra.Command, args []string) error {
×
NEW
29
                        return push.Run(cmd.Context(), flags.ProjectRef, afero.NewOsFs())
×
NEW
30
                },
×
31
        }
32
)
33

34
func init() {
1✔
35
        configCmd.PersistentFlags().StringVar(&flags.ProjectRef, "project-ref", "", "Project ref of the Supabase project.")
1✔
36
        configCmd.AddCommand(configPushCmd)
1✔
37
        rootCmd.AddCommand(configCmd)
1✔
38
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc