Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ In rare circumstances you might get rate limiting errors, if this happens you ca

| Name | Type | Description |
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `version` | `string` | Optional, A valid moonbit tool chain version, such as `0.6.18+8382ed77e`, `latest`, `pre-release`, etc. or even `bleeding`, default to `latest` |
| `version` | `string` | Optional, A valid moonbit tool chain version, such as `0.6.18+8382ed77e`, `latest`, `pre-release`, etc. or even `bleeding`. Defaults to `latest` or the value of `MOONBIT_INSTALL_VERSION` environment variable |
| `setup-core` | `bool` | Optional, Set to `true` to download and bundle Moonbit Core, `false` to ignore it, default to `true` |
| `core-version` | `string` | Optional, A valid moonbit core version, such as `0.6.18+8382ed77e`, `latest`, `pre-release`, `bleeding` etc. Default to `latest` |

Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ steps:

| 参数名 | 类型 | 描述 |
| ------------ | -------- | --------------------------------------------------------------------------------------------------------------------- |
| `version` | `string` | 可选,合法的 Moonbit 工具链版本,比如: `0.6.18+8382ed77e`, `latest`, `pre-release`, 或者 `bleeding`默认为 `latest` |
| `version` | `string` | 可选,合法的 Moonbit 工具链版本,比如: `0.6.18+8382ed77e`, `latest`, `pre-release`, 或者 `bleeding`默认为 `latest` 或环境变量 `MOONBIT_INSTALL_VERSION` 的值 |
| `setup-core` | `bool` | 设置为 `true` 则下载并打包 Moonbit Core, `false` 则忽略,默认为 `true` |
| `core-version` | `string` | 可选,合法的 Moonbit Core 版本,比如: `0.6.18+8382ed77e`, `latest`,`pre-release` 或者 `bleeding`,默认为 `latest` |

Expand Down
5 changes: 3 additions & 2 deletions nu/moonbit.nu
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ def fetch-core [ version: string ] {

# Download moonbit binary files to local
export def 'setup moonbit' [
version: string = 'latest', # The version of moonbit toolchain to setup, and `latest` by default
--setup-core(-c), # Setup moonbit core
version?, # The version of moonbit toolchain to setup, and `latest` by default
--setup-core(-c), # Setup moonbit core
--core-version(-V): string = 'latest', # The version of moonbit core to setup, `latest` by default
] {
let version = $version | default $env.MOONBIT_INSTALL_VERSION? | default 'latest'
if ($version not-in $VALID_VERSION_TAG) and not (is-semver $version) {
print $'(ansi r)Invalid version: ($version)(ansi reset)'; exit 2
}
Expand Down
Loading