Skip to content

Commit

Permalink
replace edition
Browse files Browse the repository at this point in the history
  • Loading branch information
rzadp committed Mar 14, 2024
1 parent 08f1d3d commit 74adb73
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/publish-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,19 @@ jobs:
- name: Replace the workspace references in the template
run: |
set -euo pipefail
# Use released creates, instead of git references.
find . -type f -name 'Cargo.toml' -exec psvm -o -v ${{ env.polkadot-release-version }} -p {} \;
# Set the Rust edition.
rust_edition=$(cat ../../Cargo.toml | grep "edition =")
find . -type f -name 'Cargo.toml' -exec sed -i -E "s/edition\.workspace = true\$/$rust_edition/g" {} \;
# Get rid of "authors.workspace = true" and similar entries.
find . -type f -name 'Cargo.toml' -exec sed -i -E "s/^.*\.workspace = true\$//g" {} \;
find . -type f -name 'Cargo.toml' -exec sed -i -E "s/^workspace = true\$//g" {} \;
# Replace workspace dependencies with actual versions.
# e.g. serde_json = { workspace = true, default-features = true }
replace_workspace_deps () {
# To preserve TAB identation.
IFS=''
Expand Down

0 comments on commit 74adb73

Please sign in to comment.