chiark / gitweb /
rename `fdroid server` to `fdroid deploy` and deprecate 'init'
authorHans-Christoph Steiner <hans@eds.org>
Tue, 13 Feb 2018 11:54:48 +0000 (12:54 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Tue, 13 Feb 2018 11:54:48 +0000 (12:54 +0100)
`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

completion/bash-completion
fdroid

index 2d4136411ea1c6fbe69a15fcc8929d443acf472f..2142534ebe76f662df9d167891f2b34c103accc9 100644 (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 \
diff --git a/fdroid b/fdroid
index a66df6b10098f49b577b02e9ae654bb3c4e29d27..ec9bae2cb7950405dde00e8950740e663459b889 100755 (executable)
--- a/fdroid
+++ b/fdroid
@@ -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