File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -60,24 +60,19 @@ jobs:
6060
6161 - uses : stellar/actions/rust-cache@main
6262
63- - name : Patch SDK versions
63+ - name : Patch workspace dependencies
6464 run : |
65- # TODO: Update this patch logic to use `cargo add` once this issue is resolved: https://github.com/rust-lang/cargo/issues/16101
66- crates=$(cd ${{ github.workspace }}/rs-soroban-sdk && cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.publish != []) | .name')
67- find . -name Cargo.toml | while read file; do
68- echo Patching "$file" ...
69- dir=$(dirname "$file")
70- for crate in $crates; do
71- rel_path=$(realpath --relative-to="$dir" ${{ github.workspace }}/rs-soroban-sdk/$crate)
72- sed -i 's|'"$crate"' = "\([^"]*\)"|'"$crate"' = { path = "'"$rel_path"'" }|g' "$file"
73- sed -i 's|'"$crate"' = { \(.*\)version = "[^"]*"\(.*\)|'"$crate"' = { \1path = "'"$rel_path"'" \2|g' "$file"
74- sed -i 's|'"$crate"' = { workspace = true }|'"$crate"' = { path = "'"$rel_path"'" }|g' "$file"
75- sed -i 's|'"$crate"' = { workspace = true, \(.*\) }|'"$crate"' = { path = "'"$rel_path"'" , \1 }|g' "$file"
76- done
65+ cd stellar-contracts
66+ crates=$(cd ../rs-soroban-sdk && cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.publish != []) | .name')
67+ for crate in $crates; do
68+ rel_path=$(realpath --relative-to="." ../rs-soroban-sdk/$crate)
69+ sed -i 's|'"$crate"' = "\([^"]*\)"|'"$crate"' = { path = "'"$rel_path"'" }|g' Cargo.toml
70+ sed -i 's|'"$crate"' = { \(.*\)version = "[^"]*"\(.*\)|'"$crate"' = { \1path = "'"$rel_path"'" \2|g' Cargo.toml
7771 done
7872
7973 - name : Diff
80- run : git diff
74+ run : |
75+ git diff --exit-code && exit 1
8176
8277 - name : Build contract
8378 env :
You can’t perform that action at this time.
0 commit comments