Skip to content

Commit

Permalink
Make sed a more readable
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Lopopolo <[email protected]>
  • Loading branch information
b-n and lopopolo committed Jan 23, 2024
1 parent e219694 commit 0adc659
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/toolchain-version-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ jobs:
- name: Update the toolchain version and run sync
if: ${{ steps.version_info.outputs.matches != 'true' }}
env:
NEXT_VERSION: ${{ steps.version_info.outputs.next }}
CURRENT: ${{ steps.version_info.outputs.current }}
NEXT: ${{ steps.version_info.outputs.next }}
run: |
# Matches "RUST_VERSION = 'M.M.P'" and replaces `M.M.P` with `$NEXT_VERSION`
sed -iE "s/^\(RUST_VERSION\ =\ '\).*\('\)\$/\1$NEXT_VERSION\2/g" Rakefile
# Matches `RUST_VERSION = '$CURRENT'` and replaces with `RUST_VERSION = '$NEXT'`
sed -iE "s/^RUST_VERSION = \"$CURRENT\"$/RUST_VERSION = \"$NEXT\"/g" Rakefile
bundle exec rake toolchain:sync
- name: Create Pull Request
Expand Down

0 comments on commit 0adc659

Please sign in to comment.