@@ -28,8 +28,6 @@ import (
2828)
2929
3030// Flags
31- var samplesTemplateURLFlag string
32- var samplesGitBranchFlag string
3331var samplesListFlag bool
3432var samplesLanguageFlag string
3533
@@ -56,13 +54,6 @@ func NewSamplesCommand(clients *shared.ClientFactory) *cobra.Command {
5654 },
5755 }
5856
59- // DEPRECATED(semver:major): Prefer the create command when repository details are known
60- cmd .Flags ().StringVarP (& samplesGitBranchFlag , "branch" , "b" , "" , "name of git branch to checkout" )
61- cmd .Flag ("branch" ).Hidden = true
62- // DEPRECATED(semver:major): Prefer the create command when repository details are known
63- cmd .Flags ().StringVarP (& samplesTemplateURLFlag , "template" , "t" , "" , "template URL for your app" )
64- cmd .Flag ("template" ).Hidden = true
65-
6657 cmd .Flags ().StringVar (& samplesLanguageFlag , "language" , "" , "runtime for the app framework\n ex: \" deno\" , \" node\" , \" python\" " )
6758 cmd .Flags ().BoolVar (& samplesListFlag , "list" , false , "prints samples without interactivity" )
6859
@@ -73,11 +64,6 @@ func NewSamplesCommand(clients *shared.ClientFactory) *cobra.Command {
7364func runSamplesCommand (clients * shared.ClientFactory , cmd * cobra.Command , args []string ) error {
7465 ctx := cmd .Context ()
7566
76- // DEPRECATED(semver:major): Prefer the create command when repository details are known
77- if cmd .Flag ("branch" ).Changed || cmd .Flag ("template" ).Changed {
78- clients .IO .PrintWarning (ctx , "DEPRECATED: The `--branch` and `--template` flags are deprecated for the `samples` command; use the `create` command instead" )
79- }
80-
8167 sampler := api .NewHTTPClient (api.HTTPClientOptions {
8268 TotalTimeOut : 60 * time .Second ,
8369 })
@@ -100,16 +86,11 @@ func runSamplesCommand(clients *shared.ClientFactory, cmd *cobra.Command, args [
10086 // Instantiate the `create` command to call it using programmatically set flags
10187 createCmd := NewCreateCommand (clients )
10288
103- // Prepare template and branch flags with selected or provided repo values
89+ // Prepare the template flag with the selected repo value
10490 if err := createCmd .Flag ("template" ).Value .Set (selectedSample ); err != nil {
10591 return err
10692 }
10793 createCmd .Flag ("template" ).Changed = true
108- if err := createCmd .Flag ("branch" ).Value .Set (samplesGitBranchFlag ); err != nil {
109- return err
110- }
111- createCmd .Flag ("branch" ).Changed = cmd .Flag ("branch" ).Changed
112-
11394 // If preferred directory name is passed in as an argument to the `create`
11495 // command first, honor that preference and use it to create the project
11596 createCmd .SetArgs (args )
0 commit comments