Skip to content

Commit 116bbc7

Browse files
committed
ci: Ignore point/patch release number
1 parent 49bd720 commit 116bbc7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/versions.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ jobs:
1818
uses: dtolnay/rust-toolchain@stable
1919

2020
# Capture the version installed by the action (immediately after install)
21+
# Ignore the point (patch) release number.
2122
- name: Capture installed rustc version
2223
id: installed_version
2324
run: |
24-
INSTALLED=$(rustc --version | awk '{print $2}')
25+
INSTALLED=$(rustc --version | awk '{print $2}' | awk -F. '{print $1"."$2}')
2526
echo "installed_version=$INSTALLED" >> $GITHUB_OUTPUT
2627
2728
- name: Extract rust-toolchain.toml version
@@ -32,8 +33,8 @@ jobs:
3233
3334
- name: Compare Rust versions
3435
run: |
35-
echo "rust-toolchain.toml version: ${{ steps.toolchain_version.outputs.toolchain_version }}"
3636
echo "Installed rustc version: ${{ steps.installed_version.outputs.installed_version }}"
37+
echo "rust-toolchain.toml version: ${{ steps.toolchain_version.outputs.toolchain_version }}"
3738
3839
if [[ "${{ steps.toolchain_version.outputs.toolchain_version }}" != "${{ steps.installed_version.outputs.installed_version }}" ]]; then
3940
echo "Mismatch: rust-toolchain.toml and installed rustc version differ"

0 commit comments

Comments
 (0)