Skip to content

Commit

Permalink
chore: Rename to '--config-file' flag for scaffold command
Browse files Browse the repository at this point in the history
  • Loading branch information
c-pius committed Oct 21, 2024
1 parent 09f42c8 commit 5450a32
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/modulectl/scaffold/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func Test_Execute_ParsesOptions(t *testing.T) {
os.Args = []string{
"scaffold",
"--directory", directory,
"--module-config", moduleConfigFile,
"--config-file", moduleConfigFile,
"--overwrite",
"--gen-manifest", manifestFile,
"--gen-default-cr=" + defaultCRFile,
Expand Down
2 changes: 1 addition & 1 deletion cmd/modulectl/scaffold/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const (
DirectoryFlagDefault = "./"
directoryFlagUsage = `Specifies the target directory where the scaffolding shall be generated (default "./").`

ModuleConfigFileFlagName = "module-config"
ModuleConfigFileFlagName = "config-file"
ModuleConfigFileFlagDefault = "scaffold-module-config.yaml"
moduleConfigFileFlagUsage = `Specifies the name of the generated module configuration file (default "scaffold-module-config.yaml").`

Expand Down
2 changes: 1 addition & 1 deletion cmd/modulectl/scaffold/long.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ allowing for a tailored scaffolding experience according to the specific needs o
The command generates or uses the following files:
- Module Config:
Enabled: Always
Adjustable with flag: --module-config=VALUE
Adjustable with flag: --config-file=VALUE
Generated when: The file doesn't exist or the --overwrite=true flag is provided
Default file name: scaffold-module-config.yaml
- Manifest:
Expand Down
4 changes: 2 additions & 2 deletions docs/gen-docs/modulectl_scaffold.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ allowing for a tailored scaffolding experience according to the specific needs o
The command generates or uses the following files:
- Module Config:
Enabled: Always
Adjustable with flag: --module-config=VALUE
Adjustable with flag: --config-file=VALUE
Generated when: The file doesn't exist or the --overwrite=true flag is provided
Default file name: scaffold-module-config.yaml
- Manifest:
Expand Down Expand Up @@ -75,7 +75,7 @@ Generate a scaffold with a manifest file, default CR and security-scanners confi
--gen-security-config string Specifies the security file in the generated module config. A scaffold security config file is generated if it doesn't exist (default "sec-scanners-config.yaml").
-h, --help Provides help for the scaffold command.
--module-channel string Specifies the module channel in the generated module config file (default "regular").
--module-config string Specifies the name of the generated module configuration file (default "scaffold-module-config.yaml").
--config-file string Specifies the name of the generated module configuration file (default "scaffold-module-config.yaml").
--module-name string Specifies the module name in the generated config file (default "kyma-project.io/module/mymodule").
--module-version string Specifies the module version in the generated module config file (default "0.0.1").
-o, --overwrite Specifies if the command overwrites an existing module configuration file.
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/scaffold/scaffold_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (cmd *scaffoldCmd) execute() error {
}

if cmd.moduleConfigFileFlag != "" {
args = append(args, "--module-config="+cmd.moduleConfigFileFlag)
args = append(args, "--config-file="+cmd.moduleConfigFileFlag)
}

if cmd.genDefaultCRFlag != "" {
Expand Down

0 comments on commit 5450a32

Please sign in to comment.