Skip to content

Commit

Permalink
Update usage and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chevdor committed Mar 27, 2024
1 parent e2da108 commit 19f34d7
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 17 deletions.
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,19 @@ MacOS Homebrew users can use:

Commands:
get Get/Download the runtime wasm from a running node through rpc
info The `info` command returns summarized information about a runtime
version The `version` command returns summarized information about the versions of a runtime
info Shows information about a given runtime
version Shows information about a given runtime
metadata Returns the metadata of the given runtime in several format. You may also use the "meta" alias
show Shows the a reduced view of the runtime
diff Compare 2 runtimes after converting them to `ReducedRuntime`s
diff Compare 2 runtimes after converting them to `[ReducedRuntime]`s
compress Compress a given runtime wasm file. You will get an error if you try compressing a runtime that is already compressed
decompress Decompress a given runtime wasm file. You may pass a runtime that is already uncompressed
help Print this message or the help of the given subcommand(s)

Options:
-v, --version Show the version
-j, --json Output as json
-n, --no-color [env: NO_COLOR=]
-n, --no-color Do not write color information to the output. This is recommended for scripts [env: NO_COLOR=]
-q, --quiet Less output
-h, --help Print help

Expand Down Expand Up @@ -163,6 +163,8 @@ MacOS Homebrew users can use:
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand All @@ -173,7 +175,7 @@ MacOS Homebrew users can use:

### Command: info

The `info` command returns summarized information about a runtime
Shows information about a given runtime

Usage: subwasm info [OPTIONS] [FILE]

Expand Down Expand Up @@ -202,6 +204,8 @@ MacOS Homebrew users can use:
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand All @@ -214,15 +218,15 @@ By default, the ID for the Parachain pallet is expected to be `0x01` and the cal
This default behavior can be overriden by setting the `PARACHAIN_PALLET_ID` to the ID of your parachain pallet and the
`AUTHORIZE_UPGRADE_PREFIX` to the ID of your choice.

Due to a \[breaking change to the `parachainSystem::authorizeUpgrade` extrinsic\](<https://github.com/paritytech/cumulus/commit/3249186fe643f62ca95769e2217f858dde803ab6>), a new `checkVersion` boolean flag is required on chains running on Cumulus v0.9.41 and above.
Due to a [breaking change to the `parachainSystem::authorizeUpgrade` extrinsic](https://github.com/paritytech/cumulus/commit/3249186fe643f62ca95769e2217f858dde803ab6), a new `checkVersion` boolean flag is required on chains running on Cumulus v0.9.41 and above.
This new behavior is supported by the `AUTHORIZE_UPGRADE_CHECK_VERSION` env variable, which, if set, is evaluated to
`true` if its value is the string `"true"`, or `` false` `` otherwise. If not set, the behavior remains the same as pre-0.9.41.

The new `check_spec_version` parameter can be provided with the `AUTHORIZE_UPGRADE_CHECK_VERSION=true` or `AUTHORIZE_UPGRADE_CHECK_VERSION=false` variable, if needed.

### Command: version

The `version` command returns summarized information about the versions of a runtime
Shows information about a given runtime

Usage: subwasm version [OPTIONS] [FILE]

Expand Down Expand Up @@ -251,6 +255,8 @@ The new `check_spec_version` parameter can be provided with the `AUTHORIZE_UPGRA
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand Down Expand Up @@ -299,6 +305,8 @@ The new `check_spec_version` parameter can be provided with the `AUTHORIZE_UPGRA
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand Down Expand Up @@ -342,6 +350,8 @@ The new `check_spec_version` parameter can be provided with the `AUTHORIZE_UPGRA
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand All @@ -352,7 +362,7 @@ The new `check_spec_version` parameter can be provided with the `AUTHORIZE_UPGRA

### Command: diff

Compare 2 runtimes after converting them to `ReducedRuntime`s.
Compare 2 runtimes after converting them to `[ReducedRuntime]`s.

You must pass exactly 2 runtimes.

Expand All @@ -370,6 +380,8 @@ The new `check_spec_version` parameter can be provided with the `AUTHORIZE_UPGRA
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand All @@ -390,7 +402,7 @@ The new `check_spec_version` parameter can be provided with the `AUTHORIZE_UPGRA

Options:
-j, --json Output as json
-n, --no-color [env: NO_COLOR=]
-n, --no-color Do not write color information to the output. This is recommended for scripts [env: NO_COLOR=]
-q, --quiet Less output
-h, --help Print help

Expand All @@ -414,6 +426,8 @@ The new `check_spec_version` parameter can be provided with the `AUTHORIZE_UPGRA
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand Down
8 changes: 4 additions & 4 deletions doc/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ Usage: subwasm [OPTIONS] [COMMAND]

Commands:
get Get/Download the runtime wasm from a running node through rpc
info The `info` command returns summarized information about a runtime
version The `version` command returns summarized information about the versions of a runtime
info Shows information about a given runtime
version Shows information about a given runtime
metadata Returns the metadata of the given runtime in several format. You may also use the "meta" alias
show Shows the a reduced view of the runtime
diff Compare 2 runtimes after converting them to `ReducedRuntime`s
diff Compare 2 runtimes after converting them to `[ReducedRuntime]`s
compress Compress a given runtime wasm file. You will get an error if you try compressing a runtime that is already compressed
decompress Decompress a given runtime wasm file. You may pass a runtime that is already uncompressed
help Print this message or the help of the given subcommand(s)

Options:
-v, --version Show the version
-j, --json Output as json
-n, --no-color [env: NO_COLOR=]
-n, --no-color Do not write color information to the output. This is recommended for scripts [env: NO_COLOR=]
-q, --quiet Less output
-h, --help Print help
2 changes: 1 addition & 1 deletion doc/usage_compress.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Arguments:

Options:
-j, --json Output as json
-n, --no-color [env: NO_COLOR=]
-n, --no-color Do not write color information to the output. This is recommended for scripts [env: NO_COLOR=]
-q, --quiet Less output
-h, --help Print help
2 changes: 2 additions & 0 deletions doc/usage_decompress.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Options:
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand Down
4 changes: 3 additions & 1 deletion doc/usage_diff.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Compare 2 runtimes after converting them to `ReducedRuntime`s.
Compare 2 runtimes after converting them to `[ReducedRuntime]`s.

You must pass exactly 2 runtimes.

Expand All @@ -16,6 +16,8 @@ Options:
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand Down
2 changes: 2 additions & 0 deletions doc/usage_get.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Options:
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand Down
4 changes: 3 additions & 1 deletion doc/usage_info.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The `info` command returns summarized information about a runtime
Shows information about a given runtime

Usage: subwasm info [OPTIONS] [FILE]

Expand Down Expand Up @@ -27,6 +27,8 @@ Options:
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand Down
2 changes: 2 additions & 0 deletions doc/usage_meta.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Options:
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand Down
2 changes: 2 additions & 0 deletions doc/usage_show.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Options:
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand Down
4 changes: 3 additions & 1 deletion doc/usage_version.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The `version` command returns summarized information about the versions of a runtime
Shows information about a given runtime

Usage: subwasm version [OPTIONS] [FILE]

Expand Down Expand Up @@ -27,6 +27,8 @@ Options:
Output as json

-n, --no-color
Do not write color information to the output. This is recommended for scripts

[env: NO_COLOR=]

-q, --quiet
Expand Down

0 comments on commit 19f34d7

Please sign in to comment.