mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-05 22:08:27 +00:00
Add -skip-contents flag. #142
This commit is contained in:
@@ -41,6 +41,7 @@ Example:
|
|||||||
cmd.Flag.String("passphrase-file", "", "GPG passhprase-file for the key (warning: could be insecure)")
|
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("batch", false, "run GPG with detached tty")
|
||||||
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
|
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("origin", "", "origin name to publish")
|
||||||
cmd.Flag.String("label", "", "label to publish")
|
cmd.Flag.String("label", "", "label to publish")
|
||||||
cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch")
|
cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch")
|
||||||
|
|||||||
@@ -119,6 +119,10 @@ func aptlyPublishSnapshotOrRepo(cmd *commander.Command, args []string) error {
|
|||||||
published.Origin = cmd.Flag.Lookup("origin").Value.String()
|
published.Origin = cmd.Flag.Lookup("origin").Value.String()
|
||||||
published.Label = cmd.Flag.Lookup("label").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)
|
duplicate := context.CollectionFactory().PublishedRepoCollection().CheckDuplicate(published)
|
||||||
if duplicate != nil {
|
if duplicate != nil {
|
||||||
context.CollectionFactory().PublishedRepoCollection().LoadComplete(duplicate, context.CollectionFactory())
|
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.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("batch", false, "run GPG with detached tty")
|
||||||
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
|
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("origin", "", "origin name to publish")
|
||||||
cmd.Flag.String("label", "", "label to publish")
|
cmd.Flag.String("label", "", "label to publish")
|
||||||
cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch")
|
cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch")
|
||||||
|
|||||||
@@ -90,6 +90,10 @@ func aptlyPublishSwitch(cmd *commander.Command, args []string) error {
|
|||||||
"the same package pool.\n")
|
"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)
|
err = published.Publish(context.PackagePool(), context, context.CollectionFactory(), signer, context.Progress(), forceOverwrite)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("unable to publish: %s", err)
|
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.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("batch", false, "run GPG with detached tty")
|
||||||
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
|
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.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")
|
cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch")
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,10 @@ func aptlyPublishUpdate(cmd *commander.Command, args []string) error {
|
|||||||
"the same package pool.\n")
|
"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)
|
err = published.Publish(context.PackagePool(), context, context.CollectionFactory(), signer, context.Progress(), forceOverwrite)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("unable to publish: %s", err)
|
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.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("batch", false, "run GPG with detached tty")
|
||||||
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
|
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")
|
cmd.Flag.Bool("force-overwrite", false, "overwrite files in package pool in case of mismatch")
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|||||||
18
man/aptly.1
18
man/aptly.1
@@ -1,7 +1,7 @@
|
|||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
.
|
.
|
||||||
.TH "APTLY" "1" "March 2015" "" ""
|
.TH "APTLY" "1" "April 2015" "" ""
|
||||||
.
|
.
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBaptly\fR \- Debian repository management tool
|
\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)
|
GPG secret keyring to use (instead of default)
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\-\fBskip\-contents\fR=false
|
||||||
|
don\(cqt generate Contents indexes
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\-\fBskip\-signing\fR=false
|
\-\fBskip\-signing\fR=false
|
||||||
don\(cqt sign Release files with GPG
|
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)
|
GPG secret keyring to use (instead of default)
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\-\fBskip\-contents\fR=false
|
||||||
|
don\(cqt generate Contents indexes
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\-\fBskip\-signing\fR=false
|
\-\fBskip\-signing\fR=false
|
||||||
don\(cqt sign Release files with GPG
|
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)
|
GPG secret keyring to use (instead of default)
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\-\fBskip\-contents\fR=false
|
||||||
|
don\(cqt generate Contents indexes
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\-\fBskip\-signing\fR=false
|
\-\fBskip\-signing\fR=false
|
||||||
don\(cqt sign Release files with GPG
|
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)
|
GPG secret keyring to use (instead of default)
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\-\fBskip\-contents\fR=false
|
||||||
|
don\(cqt generate Contents indexes
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\-\fBskip\-signing\fR=false
|
\-\fBskip\-signing\fR=false
|
||||||
don\(cqt sign Release files with GPG
|
don\(cqt sign Release files with GPG
|
||||||
.
|
.
|
||||||
|
|||||||
Reference in New Issue
Block a user