Make 'SkipContents' configurable in API. #345

Also add global configuration to disable 'skipContents' by
default for all new published repos/snapshots.
This commit is contained in:
Andrey Smirnov
2016-02-11 13:24:43 +03:00
parent 0339f0fe23
commit f50e008763
10 changed files with 31 additions and 2 deletions
+2
View File
@@ -119,6 +119,8 @@ func aptlyPublishSnapshotOrRepo(cmd *commander.Command, args []string) error {
published.Origin = context.Flags().Lookup("origin").Value.String()
published.Label = context.Flags().Lookup("label").Value.String()
published.SkipContents = context.Config().SkipContentsPublishing
if context.Flags().IsSet("skip-contents") {
published.SkipContents = context.Flags().Lookup("skip-contents").Value.Get().(bool)
}