rename `fdroid server` to `fdroid deploy` and deprecate 'init'

`fdroid server init` is has not been needed for a long time.  And 'server'
is the only subcommand that has its own subsubcommands.  This turns it into
only `fdroid deploy`, which does what `fdroid server update` does. This
also changes the bash completion to use `fdroid deploy`.  But the old
`fdroid server update` and `fdroid server init` commands remain working.

closes #264
This commit is contained in:
Hans-Christoph Steiner 2018-02-13 12:54:48 +01:00
parent bffa6a73be
commit 1725e09f7e
2 changed files with 10 additions and 4 deletions

View File

@ -282,10 +282,10 @@ __complete_stats() {
__complete_options
}
__complete_server() {
__complete_deploy() {
opts="-i -v -q"
lopts="--identity-file --local-copy-dir --sync-from-local-copy-dir
--verbose --quiet --no-checksum update"
--verbose --quiet --no-checksum"
__complete_options
}
@ -316,6 +316,7 @@ __cmds=" \
btlog \
build \
checkupdates \
deploy \
dscanner \
gpgsign \
import \
@ -328,7 +329,6 @@ publish \
readmeta \
rewritemeta \
scanner \
server \
signatures \
signindex \
stats \

8
fdroid
View File

@ -34,6 +34,7 @@ commands = OrderedDict([
("publish", _("Sign and place packages in the repo")),
("gpgsign", _("Add PGP signatures using GnuPG for packages in repo")),
("update", _("Update repo information for new packages")),
("deploy", _("Interact with the repo HTTP server")),
("verify", _("Verify the integrity of downloaded packages")),
("checkupdates", _("Check for updates to applications")),
("import", _("Add a new application from its source code")),
@ -44,7 +45,7 @@ commands = OrderedDict([
("scanner", _("Scan the source code of a package")),
("dscanner", _("Dynamically scan APKs post build")),
("stats", _("Update the stats of the repo")),
("server", _("Interact with the repo HTTP server")),
("server", _("Old, deprecated name for fdroid deploy")),
("signindex", _("Sign indexes created using update --nosign")),
("btlog", _("Update the binary transparency log for a URL")),
("signatures", _("Extract signatures from APKs")),
@ -122,6 +123,11 @@ def main():
logging.critical("Specifying --verbose and --quiet and the same time is silly")
sys.exit(1)
# temporary workaround until server.py becomes deploy.py
if command == 'deploy':
command = 'server'
sys.argv.insert(1, 'update')
# Trick optparse into displaying the right usage when --help is used.
sys.argv[0] += ' ' + command