diff --git a/cmd/publish_repo.go b/cmd/publish_repo.go index 892d7a62..a7a05cac 100644 --- a/cmd/publish_repo.go +++ b/cmd/publish_repo.go @@ -41,6 +41,7 @@ Example: cmd.Flag.String("passphrase-file", "", "GPG passhprase-file for the key (warning: could be insecure)") cmd.Flag.Bool("batch", false, "run GPG with detached tty") cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG") + cmd.Flag.Bool("skip-contents", false, "don't generate Contents indexes") cmd.Flag.String("origin", "", "origin name to publish") cmd.Flag.String("label", "", "label to publish") cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch") diff --git a/cmd/publish_snapshot.go b/cmd/publish_snapshot.go index b207c5b1..d9d92f52 100644 --- a/cmd/publish_snapshot.go +++ b/cmd/publish_snapshot.go @@ -119,6 +119,10 @@ func aptlyPublishSnapshotOrRepo(cmd *commander.Command, args []string) error { published.Origin = cmd.Flag.Lookup("origin").Value.String() published.Label = cmd.Flag.Lookup("label").Value.String() + if cmd.Flag.IsSet("skip-contents") { + published.SkipContents = cmd.Flag.Lookup("skip-contents").Value.Get().(bool) + } + duplicate := context.CollectionFactory().PublishedRepoCollection().CheckDuplicate(published) if duplicate != nil { context.CollectionFactory().PublishedRepoCollection().LoadComplete(duplicate, context.CollectionFactory()) @@ -203,6 +207,7 @@ Example: cmd.Flag.String("passphrase-file", "", "GPG passhprase-file for the key (warning: could be insecure)") cmd.Flag.Bool("batch", false, "run GPG with detached tty") cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG") + cmd.Flag.Bool("skip-contents", false, "don't generate Contents indexes") cmd.Flag.String("origin", "", "origin name to publish") cmd.Flag.String("label", "", "label to publish") cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch") diff --git a/cmd/publish_switch.go b/cmd/publish_switch.go index ea3402d0..13ae0ae1 100644 --- a/cmd/publish_switch.go +++ b/cmd/publish_switch.go @@ -90,6 +90,10 @@ func aptlyPublishSwitch(cmd *commander.Command, args []string) error { "the same package pool.\n") } + if cmd.Flag.IsSet("skip-contents") { + published.SkipContents = cmd.Flag.Lookup("skip-contents").Value.Get().(bool) + } + err = published.Publish(context.PackagePool(), context, context.CollectionFactory(), signer, context.Progress(), forceOverwrite) if err != nil { return fmt.Errorf("unable to publish: %s", err) @@ -143,6 +147,7 @@ This command would switch published repository (with one component) named ppa/wh cmd.Flag.String("passphrase-file", "", "GPG passhprase-file for the key (warning: could be insecure)") cmd.Flag.Bool("batch", false, "run GPG with detached tty") cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG") + cmd.Flag.Bool("skip-contents", false, "don't generate Contents indexes") cmd.Flag.String("component", "", "component names to update (for multi-component publishing, separate components with commas)") cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch") diff --git a/cmd/publish_update.go b/cmd/publish_update.go index 93273a45..7b6b65f1 100644 --- a/cmd/publish_update.go +++ b/cmd/publish_update.go @@ -54,6 +54,10 @@ func aptlyPublishUpdate(cmd *commander.Command, args []string) error { "the same package pool.\n") } + if cmd.Flag.IsSet("skip-contents") { + published.SkipContents = cmd.Flag.Lookup("skip-contents").Value.Get().(bool) + } + err = published.Publish(context.PackagePool(), context, context.CollectionFactory(), signer, context.Progress(), forceOverwrite) if err != nil { return fmt.Errorf("unable to publish: %s", err) @@ -102,6 +106,7 @@ Example: cmd.Flag.String("passphrase-file", "", "GPG passhprase-file for the key (warning: could be insecure)") cmd.Flag.Bool("batch", false, "run GPG with detached tty") cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG") + cmd.Flag.Bool("skip-contents", false, "don't generate Contents indexes") cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch") return cmd diff --git a/man/aptly.1 b/man/aptly.1 index 26c64b4e..a838d103 100644 --- a/man/aptly.1 +++ b/man/aptly.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "APTLY" "1" "March 2015" "" "" +.TH "APTLY" "1" "April 2015" "" "" . .SH "NAME" \fBaptly\fR \- Debian repository management tool @@ -1256,6 +1256,10 @@ GPG passhprase\-file for the key (warning: could be insecure) GPG secret keyring to use (instead of default) . .TP +\-\fBskip\-contents\fR=false +don\(cqt generate Contents indexes +. +.TP \-\fBskip\-signing\fR=false don\(cqt sign Release files with GPG . @@ -1339,6 +1343,10 @@ GPG passhprase\-file for the key (warning: could be insecure) GPG secret keyring to use (instead of default) . .TP +\-\fBskip\-contents\fR=false +don\(cqt generate Contents indexes +. +.TP \-\fBskip\-signing\fR=false don\(cqt sign Release files with GPG . @@ -1413,6 +1421,10 @@ GPG passhprase\-file for the key (warning: could be insecure) GPG secret keyring to use (instead of default) . .TP +\-\fBskip\-contents\fR=false +don\(cqt generate Contents indexes +. +.TP \-\fBskip\-signing\fR=false don\(cqt sign Release files with GPG . @@ -1470,6 +1482,10 @@ GPG passhprase\-file for the key (warning: could be insecure) GPG secret keyring to use (instead of default) . .TP +\-\fBskip\-contents\fR=false +don\(cqt generate Contents indexes +. +.TP \-\fBskip\-signing\fR=false don\(cqt sign Release files with GPG .