This is an automated email from the ASF dual-hosted git repository. ccollins pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git
commit b43ef93e7465cd3f0e4b45b57787cc6cfcf9ee47 Author: Christopher Collins <ccoll...@apache.org> AuthorDate: Mon Jan 27 10:21:56 2020 -0800 Remove deprecated `install` and `sync` commands --- newt/cli/project_cmds.go | 63 ------------------------------------------------ 1 file changed, 63 deletions(-) diff --git a/newt/cli/project_cmds.go b/newt/cli/project_cmds.go index 087a9fc..68bfbef 100644 --- a/newt/cli/project_cmds.go +++ b/newt/cli/project_cmds.go @@ -102,18 +102,6 @@ func makeRepoPredicate(repoNames []string) func(r *repo.Repo) bool { } } -func installRunCmd(cmd *cobra.Command, args []string) { - proj := TryGetOrDownloadProject() - interfaces.SetProject(proj) - - pred := makeRepoPredicate(args) - if err := proj.UpgradeIf( - newtutil.NewtForce, newtutil.NewtAsk, pred); err != nil { - - NewtUsage(nil, err) - } -} - func upgradeRunCmd(cmd *cobra.Command, args []string) { proj := TryGetOrDownloadProject() interfaces.SetProject(proj) @@ -181,39 +169,7 @@ func infoRunCmd(cmd *cobra.Command, args []string) { } } -func syncRunCmd(cmd *cobra.Command, args []string) { - proj := TryGetOrDownloadProject() - pred := makeRepoPredicate(args) - - if err := proj.UpgradeIf( - newtutil.NewtForce, newtutil.NewtAsk, pred); err != nil { - - NewtUsage(nil, err) - } -} - func AddProjectCommands(cmd *cobra.Command) { - installHelpText := "" - installHelpEx := " newt install\n" - installHelpEx += " Installs all repositories specified in project.yml.\n\n" - installHelpEx += " newt install apache-mynewt-core\n" - installHelpEx += " Installs the apache-mynewt-core repository." - installCmd := &cobra.Command{ - Use: "install [repo-1] [repo-2] [...]", - Deprecated: "use \"upgrade\" instead", - Long: installHelpText, - Example: installHelpEx, - Run: installRunCmd, - } - installCmd.PersistentFlags().BoolVarP(&newtutil.NewtForce, - "force", "f", false, - "Force install of the repositories in project, regardless of what "+ - "exists in repos directory") - installCmd.PersistentFlags().BoolVarP(&newtutil.NewtAsk, - "ask", "a", false, "Prompt user before installing any repos") - - cmd.AddCommand(installCmd) - upgradeHelpText := "" upgradeHelpEx := " newt upgrade\n" upgradeHelpEx += " Upgrades all repositories specified in project.yml.\n\n" @@ -234,25 +190,6 @@ func AddProjectCommands(cmd *cobra.Command) { cmd.AddCommand(upgradeCmd) - syncHelpText := "" - syncHelpEx := " newt sync\n" - syncHelpEx += " Syncs all repositories specified in project.yml.\n\n" - syncHelpEx += " newt sync apache-mynewt-core\n" - syncHelpEx += " Syncs the apache-mynewt-core repository." - syncCmd := &cobra.Command{ - Use: "sync [repo-1] [repo-2] [...]", - Deprecated: "use \"upgrade\" instead", - Long: syncHelpText, - Example: syncHelpEx, - Run: syncRunCmd, - } - syncCmd.PersistentFlags().BoolVarP(&newtutil.NewtForce, - "force", "f", false, - "Force overwrite of existing remote repositories.") - syncCmd.PersistentFlags().BoolVarP(&newtutil.NewtAsk, - "ask", "a", false, "Prompt user before syncing any repos") - cmd.AddCommand(syncCmd) - newHelpText := "" newHelpEx := "" newCmd := &cobra.Command{