Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich committed Feb 27, 2024
1 parent 7547d66 commit ea07dc7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<value> (required) source directory from which to upload the app installation
--ssh-user=<value> override the SSH user to connect with; if omitted, your own user will be used
Expand Down Expand Up @@ -2409,7 +2409,7 @@ Imports a dump of a MySQL database

```
USAGE
$ mw database mysql import DATABASE-ID -i <value> [-q] [-p <value>] [--temporary-user] [--ssh-user <value>]
$ mw database mysql import DATABASE-ID -i <value> [-q] [-p <value>] [--temporary-user] [--ssh-user <value>] [--gzip]
ARGUMENTS
DATABASE-ID The ID of the database (when a project context is set, you can also use the name)
Expand All @@ -2418,6 +2418,7 @@ FLAGS
-i, --input=<value> (required) the input file from which to read the dump ("-" for stdin)
-p, --mysql-password=<value> 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=<value> 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
Expand All @@ -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=<value> 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
Expand Down
30 changes: 16 additions & 14 deletions src/commands/app/upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ export class Upload extends ExecRenderBaseCommand<typeof Upload, void> {
...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,
}),
};

Expand Down Expand Up @@ -89,20 +89,22 @@ export class Upload extends ExecRenderBaseCommand<typeof Upload, void> {
[...rsyncOpts, source, `${user}@${host}:${directory}/`],
);

if (dryRun) {
await p.complete(
<Success>
App would (probably) have successfully been uploaded. πŸ™‚
</Success>,
);
} else {
await p.complete(
<Success>App successfully uploaded; have fun! πŸš€</Success>,
);
}
await p.complete(<UploadSuccess dryRun={dryRun} />);
}

protected render(): ReactNode {
return undefined;
}
}

function UploadSuccess({ dryRun }: { dryRun: boolean }) {
if (dryRun) {
return (
<Success>
App would (probably) have successfully been uploaded. πŸ™‚
</Success>
);
}

return <Success>App successfully uploaded; have fun! πŸš€</Success>;
}

0 comments on commit ea07dc7

Please sign in to comment.