Skip to content

Commit

Permalink
???
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Oct 20, 2023
1 parent f5a7329 commit 4774336
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ jobs:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
- run: git config --global --add safe.directory "$PWD" # actions/runner#2033
- run: |
VERSION="$(grep 'channel = ".*"' rust-toolchain.toml | grep '[0-9]+.[0-9]+.[0-9]+' --only-matching)"
if [ "$(cargo --version | cut -d' ' -f2)" != "$VERSION" ]; then
echo "::error file=rust-toolchain::rust-toolchain $VERSION does not match devcontainer $(cargo --version)"
VERSION_REGEX='channel = "[0-9]+.[0-9]+.[0-9]+"'
if [[ "$(cat rust-toolchain.toml)" ~= "$VERSION_REGEX" ]]; then
if [ "$(cargo --version | cut -d' ' -f2)" != "$VERSION" ]; then
echo "::error file=rust-toolchain.toml::rust-toolchain $VERSION does not match devcontainer $(cargo --version)"
exit 1
fi
else
echo "::error file=rust-toolchain.toml::failed to parse rust-toolchain.toml"
exit 1
fi
workflows:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 4774336

Please sign in to comment.