Add -force-overwrite flag to publish update, switch, snapshot and repo commands. #90

Includes new and updated system tests.
This commit is contained in:
Andrey Smirnov
2014-08-05 17:01:18 +04:00
parent fe879acf9c
commit bb6593d21e
32 changed files with 284 additions and 6 deletions
+2 -2
View File
@@ -132,8 +132,8 @@ func aptlyPublishSnapshotOrRepo(cmd *commander.Command, args []string) error {
forceOverwrite := context.flags.Lookup("force-overwrite").Value.Get().(bool)
if forceOverwrite {
context.Progress().Printf("WARNING: force overwrite mode enabled, aptly might corrupt other published repositories sharing " +
"the same package pool.")
context.Progress().ColoredPrintf("@rWARNING@|: force overwrite mode enabled, aptly might corrupt other published repositories sharing " +
"the same package pool.\n")
}
err = published.Publish(context.PackagePool(), context, context.CollectionFactory(), signer, context.Progress(), forceOverwrite)
+2 -2
View File
@@ -81,8 +81,8 @@ func aptlyPublishSwitch(cmd *commander.Command, args []string) error {
forceOverwrite := context.flags.Lookup("force-overwrite").Value.Get().(bool)
if forceOverwrite {
context.Progress().Printf("WARNING: force overwrite mode enabled, aptly might corrupt other published repositories sharing " +
"the same package pool.")
context.Progress().ColoredPrintf("@rWARNING@|: force overwrite mode enabled, aptly might corrupt other published repositories sharing " +
"the same package pool.\n")
}
err = published.Publish(context.PackagePool(), context, context.CollectionFactory(), signer, context.Progress(), forceOverwrite)
+2 -2
View File
@@ -50,8 +50,8 @@ func aptlyPublishUpdate(cmd *commander.Command, args []string) error {
forceOverwrite := context.flags.Lookup("force-overwrite").Value.Get().(bool)
if forceOverwrite {
context.Progress().Printf("WARNING: force overwrite mode enabled, aptly might corrupt other published repositories sharing " +
"the same package pool.")
context.Progress().ColoredPrintf("@rWARNING@|: force overwrite mode enabled, aptly might corrupt other published repositories sharing " +
"the same package pool.\n")
}
err = published.Publish(context.PackagePool(), context, context.CollectionFactory(), signer, context.Progress(), forceOverwrite)