Refactor openshift buildconfig CLI options.
- Remove --buildconfig, -bc option. Create buildconfig if service has build info - Rename --branch to --build-branch - Rename --repo to --build-repo
This commit is contained in:
+7
-3
@@ -63,7 +63,8 @@ func ValidateFlags(bundle string, args []string, cmd *cobra.Command, opt *kobjec
|
||||
|
||||
// OpenShift specific flags
|
||||
deploymentConfig := cmd.Flags().Lookup("deployment-config").Changed
|
||||
buildConfig := cmd.Flags().Lookup("build-config").Changed
|
||||
buildRepo := cmd.Flags().Lookup("build-repo").Changed
|
||||
buildBranch := cmd.Flags().Lookup("build-branch").Changed
|
||||
|
||||
// Kubernetes specific flags
|
||||
chart := cmd.Flags().Lookup("chart").Changed
|
||||
@@ -90,8 +91,11 @@ func ValidateFlags(bundle string, args []string, cmd *cobra.Command, opt *kobjec
|
||||
if deploymentConfig {
|
||||
logrus.Fatalf("--deployment-config is an OpenShift only flag")
|
||||
}
|
||||
if buildConfig {
|
||||
logrus.Fatalf("--build-config is an Openshift only flag")
|
||||
if buildRepo {
|
||||
logrus.Fatalf("--build-repo is an Openshift only flag")
|
||||
}
|
||||
if buildBranch {
|
||||
logrus.Fatalf("--build-branch is an Openshift only flag")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user