Skip to content

Commit

Permalink
[#674] Rename Flavor to Variant
Browse files Browse the repository at this point in the history
- Big grep replace
- Update docs
  • Loading branch information
aatwi committed Aug 13, 2024
1 parent b7b31d5 commit 4b07dff
Show file tree
Hide file tree
Showing 30 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion doc/tcr.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ tcr [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-h, --help help for tcr
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
2 changes: 1 addition & 1 deletion doc/tcr_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ tcr check [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
2 changes: 1 addition & 1 deletion doc/tcr_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ tcr config [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
2 changes: 1 addition & 1 deletion doc/tcr_config_reset.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ tcr config reset [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
2 changes: 1 addition & 1 deletion doc/tcr_config_save.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ tcr config save [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
2 changes: 1 addition & 1 deletion doc/tcr_config_show.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ tcr config show [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
2 changes: 1 addition & 1 deletion doc/tcr_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ tcr info [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
2 changes: 1 addition & 1 deletion doc/tcr_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ tcr log [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
2 changes: 1 addition & 1 deletion doc/tcr_mob.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ tcr mob [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
2 changes: 1 addition & 1 deletion doc/tcr_one-shot.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ tcr one-shot [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
2 changes: 1 addition & 1 deletion doc/tcr_solo.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ tcr solo [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
2 changes: 1 addition & 1 deletion doc/tcr_stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ tcr stats [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
2 changes: 1 addition & 1 deletion doc/tcr_web.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ tcr web [flags]
-F, --commit-failures enable committing reverts on tests failure
-c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory)
-d, --duration duration set the duration for role rotation countdown timer
-f, --flavor string indicate the flavor to be used by TCR: nice (default) or original
-l, --language string indicate the programming language to be used by TCR
-m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]")
-o, --polling duration set VCS polling period when running as navigator
-P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483)
-t, --toolchain string indicate the toolchain to be used by TCR
-T, --trace string indicate trace options. Recognized values: none (default), vcs or http
-r, --variant string indicate the variant to be used by TCR: nice (default) or original
-V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4
-w, --work-dir string indicate the directory from which TCR is running (default: current directory)
```
Expand Down
6 changes: 3 additions & 3 deletions src/cli/terminal_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ func (term *TerminalUI) ShowSessionInfo() {
term.printInfo("Work Directory: ", info.WorkDir)
term.printInfo("Language=", info.LanguageName, ", Toolchain=", info.ToolchainName)
term.printVCSInfo(info)
term.printFlavor(info)
term.printVariant(info)
term.printMessageSuffix(info.MessageSuffix)
}

Expand All @@ -353,8 +353,8 @@ func (term *TerminalUI) printVCSInfo(info engine.SessionInfo) {
}
}

func (term *TerminalUI) printFlavor(info engine.SessionInfo) {
term.printInfo("Flavor is ", info.Flavor)
func (term *TerminalUI) printVariant(info engine.SessionInfo) {
term.printInfo("Variant is ", info.Variant)
}

func (term *TerminalUI) printMessageSuffix(suffix string) {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/terminal_ui_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ func Test_show_session_info(t *testing.T) {
asCyanTrace("Work Directory: fake") +
asCyanTrace("Language=fake, Toolchain=fake") +
asYellowTrace("VCS \"fake\" is unknown") +
asCyanTrace("Flavor is nice")
asCyanTrace("Variant is nice")

assert.Equal(t, expected, capturer.CaptureStdout(func() {
term, _, _ := terminalSetup(*params.AParamSet())
Expand Down
12 changes: 6 additions & 6 deletions src/config/param_flavor.go → src/config/param_variant.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ import (
"github.com/spf13/cobra"
)

// AddFlavorParam adds flavor parameter to the provided command
func AddFlavorParam(cmd *cobra.Command) *StringParam {
// AddVariantParam adds variant parameter to the provided command
func AddVariantParam(cmd *cobra.Command) *StringParam {
param := StringParam{
s: paramSettings{
viperSettings: viperSettings{
enabled: true,
keyPath: "config.tcr",
name: "flavor",
name: "variant",
},
cobraSettings: cobraSettings{
name: "flavor",
shorthand: "f",
usage: "indicate the flavor to be used by TCR: nice (default) or original",
name: "variant",
shorthand: "r",
usage: "indicate the variant to be used by TCR: nice (default) or original",
persistent: true,
},
},
Expand Down
Loading

0 comments on commit 4b07dff

Please sign in to comment.