3
0
Fork 0
mirror of https://github.com/dtolnay/rust-toolchain.git synced 2024-11-25 17:49:31 +01:00

Merge pull request #25 from 9999years/multiple-targets

Rename `target` to `targets`
This commit is contained in:
David Tolnay 2022-07-20 14:45:07 -07:00 committed by GitHub
commit 4582dac165
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -42,8 +42,8 @@ All inputs are optional.
</td>
</tr>
<tr>
<td><code>target</code></td>
<td>Additional target support to install e.g. <code>wasm32-unknown-unknown</code></td>
<td><code>targets</code></td>
<td>Comma-separated string of additional targets to install e.g. <code>wasm32-unknown-unknown</code></td>
</tr>
<tr>
<td><code>components</code></td>

View file

@ -9,8 +9,11 @@ inputs:
toolchain:
description: Rust toolchain specification -- see https://rust-lang.github.io/rustup/concepts/toolchains.html#toolchain-specification
required: true
targets:
description: Comma-separated list of target triples to install for this toolchain
required: false
target:
description: Target triple to install for this toolchain
description: Alias for `targets`
required: false
components:
description: Comma-separated list of components to be additionally installed
@ -27,6 +30,9 @@ runs:
- id: flags
run: |
: construct rustup command line
if [[ -z "$targets" ]]; then
targets="$target"
fi
echo "::set-output name=targets::$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)"
echo "::set-output name=components::$(for c in ${components//,/ }; do echo -n ' --component' $c; done)"
echo "::set-output name=downgrade::${{inputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}"