Skip to content

Commit c1a7d88

Browse files
update soroban examples test workflow patch logic
1 parent 8219d77 commit c1a7d88

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/test-with-soroban-examples.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,14 @@ jobs:
7575
run: |
7676
# TODO: Update this patch logic to use `cargo add` once this issue is resolved: https://github.com/rust-lang/cargo/issues/16101
7777
crates=$(cd ${{ github.workspace }}/rs-soroban-sdk && cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.publish != []) | .name')
78-
find . -name Cargo.toml | while read file; do
78+
79+
# Find Cargo.toml files to patch
80+
local_files=$(find . -name Cargo.toml)
81+
workspace_root=$(cargo metadata --format-version 1 --no-deps | jq -r '.workspace_root')
82+
files=$(echo "$local_files"; echo "$workspace_root/Cargo.toml")
83+
84+
# Patch local files and workspace root (sort -u to deduplicate)
85+
echo "$files" | sort -u | while read file; do
7986
echo Patching "$file" ...
8087
dir=$(dirname "$file")
8188
for crate in $crates; do

0 commit comments

Comments
 (0)