Skip to content

Commit

Permalink
CoW dependencies job fix (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
squadgazzz authored Jul 2, 2024
1 parent c29cd8b commit 99b7538
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/update-cow-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,7 @@ jobs:
- name: Update Cargo.toml
run: |
sed -i '/git = "https:\/\/github.com\/cowprotocol\/services.git"/s/tag = ".*"/tag = "${{ env.TAG }}"/g' ./Cargo.toml
- name: Identify and update specific CoW dependencies in Cargo.lock
run: |
PACKAGES=$(grep -oP 'package = "\K[^"]*' <(grep -B1 'git = "https:\/\/github.com\/cowprotocol\/services.git"' Cargo.toml))
echo "Identified packages: $PACKAGES"
for package in $PACKAGES; do
echo "Updating package: $package"
cargo update -p $package
done
sed -i '/git = "https:\/\/github.com\/cowprotocol\/services.git"/!b; s/tag = "[^"]*"/tag = "${{ env.TAG }}"/g' ./Cargo.toml
- name: Check for changes
run: |
Expand All @@ -47,6 +38,16 @@ jobs:
if: env.CHANGES_DETECTED != 'true'
run: echo "No updates necessary. Dependencies are already up-to-date."

- name: Update specific CoW dependencies in Cargo.lock
if: env.CHANGES_DETECTED == 'true'
run: |
PACKAGES=$(grep -oP 'package = "\K[^"]*' <(grep -B1 'git = "https:\/\/github.com\/cowprotocol\/services.git"' Cargo.toml))
echo "Identified packages: $PACKAGES"
for package in $PACKAGES; do
echo "Updating package: $package"
cargo update -p $package
done
- name: Commit changes
if: env.CHANGES_DETECTED == 'true'
id: commit
Expand Down

0 comments on commit 99b7538

Please sign in to comment.