Merge pull request #23 from dtolnay/version

Ensure version comes from the just-installed toolchain
This commit is contained in:
David Tolnay 2022-07-15 11:15:00 -07:00 committed by GitHub
commit 1ce4a7352a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,9 +50,9 @@ runs:
- id: rustc-version - id: rustc-version
run: | run: |
: create cachekey : create cachekey
DATE=$(rustc --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') DATE=$(rustc +${{inputs.toolchain}} --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p')
HASH=$(rustc --version --verbose | sed -ne 's/^commit-hash: //p') HASH=$(rustc +${{inputs.toolchain}} --version --verbose | sed -ne 's/^commit-hash: //p')
echo "::set-output name=cachekey::$(echo $DATE$HASH | head -c12)" echo "::set-output name=cachekey::$(echo $DATE$HASH | head -c12)"
shell: bash shell: bash
- run: rustc --version --verbose - run: rustc +${{inputs.toolchain}} --version --verbose
shell: bash shell: bash