MCA: Skip format bump check

Fixes #736

Signed-off-by: John Akre <john.w.akre@intel.com>
This commit is contained in:
John Akre
2020-03-03 16:24:50 -08:00
committed by Reagan Lopez
parent bfc02ef322
commit a3e96f8cc6
+6 -5
View File
@@ -30,7 +30,7 @@ import (
"github.com/spf13/cobra"
)
const bumpMarker = "format-bump"
const skipBumpCheck = "skip-format-bump"
// Sets the default number of RPM download retries
const retriesDefault = 3
@@ -98,8 +98,8 @@ var buildCmd = &cobra.Command{
return err
}
// Skip format bump check for format-bump commands
if hasMarker(cmd, bumpMarker) {
// Skip format bump check for format-bump commands and MCA
if hasMarker(cmd, skipBumpCheck) {
return nil
}
@@ -767,11 +767,12 @@ func init() {
}
for _, cmd := range bumpCmds {
addMarker(cmd, bumpMarker)
addMarker(cmd, skipBumpCheck)
buildFormatBumpCmd.AddCommand(cmd)
}
addMarker(buildUpstreamFormatCmd, bumpMarker)
addMarker(buildUpstreamFormatCmd, skipBumpCheck)
addMarker(buildValidateCmd, skipBumpCheck)
buildFormatBumpCmd.Flags().StringVar(&buildFlags.newFormat, "new-format", "", "Supply the next format version to build mixes in")
buildFormatOldCmd.Flags().StringVar(&buildFlags.newFormat, "new-format", "", "Supply the next format version to build mixes in")