diff --git a/README.md b/README.md index a4c37e1cf..546b79f33 100644 --- a/README.md +++ b/README.md @@ -1555,8 +1555,8 @@ ARGUMENTS FLAGS -q, --quiet suppress process output and only display a machine-readable summary. - --delete delete local files that are not present on the server - --dry-run do not actually download the app installation + --delete delete remote files that are not present locally + --dry-run do not actually upload the app installation --source= (required) source directory from which to upload the app installation --ssh-user= override the SSH user to connect with; if omitted, your own user will be used @@ -2409,7 +2409,7 @@ Imports a dump of a MySQL database ``` USAGE - $ mw database mysql import DATABASE-ID -i [-q] [-p ] [--temporary-user] [--ssh-user ] + $ mw database mysql import DATABASE-ID -i [-q] [-p ] [--temporary-user] [--ssh-user ] [--gzip] ARGUMENTS DATABASE-ID The ID of the database (when a project context is set, you can also use the name) @@ -2418,6 +2418,7 @@ FLAGS -i, --input= (required) the input file from which to read the dump ("-" for stdin) -p, --mysql-password= the password to use for the MySQL user (env: MYSQL_PWD) -q, --quiet suppress process output and only display a machine-readable summary. + --gzip uncompress the dump with gzip --ssh-user= override the SSH user to connect with; if omitted, your own user will be used --[no-]temporary-user create a temporary user for the dump @@ -2440,6 +2441,11 @@ FLAG DESCRIPTIONS This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in scripts), you can use this flag to easily get the IDs of created resources for further processing. + --gzip uncompress the dump with gzip + + Uncompress the dump with gzip while importing. This is useful for large databases, as it can significantly reduce + the size of the dump. + --ssh-user= override the SSH user to connect with; if omitted, your own user will be used This flag can be used to override the SSH user that is used for a connection; be default, your own personal user diff --git a/src/commands/app/upload.tsx b/src/commands/app/upload.tsx index 900a4007b..c54812d3b 100644 --- a/src/commands/app/upload.tsx +++ b/src/commands/app/upload.tsx @@ -26,17 +26,17 @@ export class Upload extends ExecRenderBaseCommand { ...processFlags, ...sshConnectionFlags, "dry-run": Flags.boolean({ - description: "do not actually download the app installation", + description: "do not actually upload the app installation", default: false, }), delete: Flags.boolean({ - description: "delete local files that are not present on the server", + description: "delete remote files that are not present locally", default: false, }), source: Flags.directory({ description: "source directory from which to upload the app installation", required: true, - exists: false, + exists: true, }), }; @@ -89,20 +89,22 @@ export class Upload extends ExecRenderBaseCommand { [...rsyncOpts, source, `${user}@${host}:${directory}/`], ); - if (dryRun) { - await p.complete( - - App would (probably) have successfully been uploaded. 🙂 - , - ); - } else { - await p.complete( - App successfully uploaded; have fun! 🚀, - ); - } + await p.complete(); } protected render(): ReactNode { return undefined; } } + +function UploadSuccess({ dryRun }: { dryRun: boolean }) { + if (dryRun) { + return ( + + App would (probably) have successfully been uploaded. 🙂 + + ); + } + + return App successfully uploaded; have fun! 🚀; +}