Skip to content

Commit

Permalink
Copy required workspace dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rzadp committed May 28, 2024
1 parent c7cc6a7 commit 95e1355
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/sync-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ jobs:
- name: Copy over the new changes
run: |
cp -r polkadot-sdk/templates/${{ matrix.template }}/* "${{ env.template-path }}/"
- name: Copy over required workspace dependencies
run: |
echo "[workspace.dependencies]" >> Cargo.toml
while cargo tree --depth 1 --prefix none --no-dedupe 2>&1 | grep 'was not found in `workspace.dependencies`'; do
missing_dep=$(cargo tree --depth 1 --prefix none --no-dedupe 2>&1 | grep 'was not found in `workspace.dependencies`' | sed -E 's/(.*)`dependency.(.*)\` was not found in \`workspace.dependencies\`/\2/')
toml get ../polkadot-sdk/Cargo.toml 'workspace.dependencies' --output-toml | grep "^${missing_dep} = " >> Cargo.toml
done;
working-directory: "${{ env.template-path }}"

# 3. Verify the build. Push the changes or create a PR.

Expand Down

0 comments on commit 95e1355

Please sign in to comment.