- Notifications
You must be signed in to change notification settings - Fork1.1k
chore: deprecate template create command in favor of template push#11390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
43 commits Select commitHold shift + click to select a range
0cc46c8 fix: make template push a superset of template create
f0ssel93da7d0 add back work dir
f0ssel3c409f6 add groupacl
f0ssel4b763d7 Add back workdir
f0sseld178cc7 combine edit flags
f0ssel5474942 fix edit
f0ssel2b9bcf6 unify edit and push
f0ssel44f264b make gen
f0sseld58cf18 fix test
f0ssel9b32922 make gen
f0sselc6ef6f4 update golden
f0ssele1e1653 fix tests:
f0ssel0cdefbc fix merge
f0sseld2a7866 add test
f0ssel63d57fd remove test
f0sselca65869 add unset test
f0ssel9866235 Add deprecation warning
f0ssel35c7adf fix
f0ssel4abf179 rename functions
f0ssela3fdb76 test removing flags
f0ssel7599090 revert
f0ssele958e1a cleanup
f0sselc8cae6c add back flag
f0ssel1b03e89 remove create command
f0ssel8918cda make gen
f0ssel7d2a7ac fix gen
f0ssel5b2792d add private flag to template edit
f0sselb85a73c fix test
f0ssel7655bc9 fix golden
f0ssel2f2911a update mentions of templates create command
f0ssel5334e8e update golden
f0ssel79c0c02 add removal comment
f0ssel2dfb98e Add back create
f0sselcb0aec4 fix formatting
f0sseld1f13d1 add disableeveryonegroupaccess test
f0ssel5792279 update test
f0ssel2e54259 fix test lint
f0sselde78f4b pr comments
f0ssel0c859bc fix text formatting
f0sselb65ab81 Add deprecation to help text
f0ssel77c9edf fix template push wording
f0ssel13794fd golden
f0ssel8355850 fix gen again
f0sselFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletionscli/cliui/deprecation.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package cliui | ||
| import ( | ||
| "fmt" | ||
| "github.com/coder/coder/v2/cli/clibase" | ||
| "github.com/coder/pretty" | ||
| ) | ||
| func DeprecationWarning(message string) clibase.MiddlewareFunc { | ||
| return func(next clibase.HandlerFunc) clibase.HandlerFunc { | ||
| return func(i *clibase.Invocation) error { | ||
| _, _ = fmt.Fprintln(i.Stdout, "\n"+pretty.Sprint(DefaultStyles.Wrap, | ||
| pretty.Sprint( | ||
| DefaultStyles.Warn, | ||
| "DEPRECATION WARNING: This command will be removed in a future release."+"\n"+message+"\n"), | ||
| )) | ||
| return next(i) | ||
| } | ||
| } | ||
| } |
114 changes: 5 additions & 109 deletionscli/templatecreate.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
60 changes: 0 additions & 60 deletionscli/templatecreate_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletionscli/templateedit.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletioncli/templateinit.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletioncli/templatelist.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.