Skip to content

Commit

Permalink
Use '@' separator to avoid problems with 'repository' value
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwan committed Aug 16, 2023
1 parent f2762a2 commit 2d632d3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,16 @@ jobs:
3.6
- name: Patch Cargo.toml
run: |
# since we're using an older maturin version, metadata inheritance doesn't work -
# overwrite it explicitly
# - older maturin versions don't support metadata inheritance - overwrite it explicitly
# - use '@' separator since 'repository' contains slashes
sed -i \
-e "s/categories.workspace = true/$(grep '^categories' Cargo.toml)/" \
-e "s/edition.workspace = true/$(grep '^edition' Cargo.toml)/" \
-e "s/keywords.workspace = true/$(grep '^keywords' Cargo.toml)/" \
-e "s/license.workspace = true/$(grep '^license' Cargo.toml)/" \
-e "s/repository.workspace = true/$(grep '^repository' Cargo.toml)/" \
-e "s/rust-version.workspace = true/$(grep '^rust-version' Cargo.toml)/" \
-e "s/version.workspace = true/$(grep '^version' Cargo.toml)/" \
-e "s@categories.workspace = true@$(grep '^categories' Cargo.toml)@" \
-e "s@edition.workspace = true@$(grep '^edition' Cargo.toml)@" \
-e "s@keywords.workspace = true@$(grep '^keywords' Cargo.toml)@" \
-e "s@license.workspace = true@$(grep '^license' Cargo.toml)@" \
-e "s@repository.workspace = true@$(grep '^repository' Cargo.toml)@" \
-e "s@rust-version.workspace = true@$(grep '^rust-version' Cargo.toml)@" \
-e "s@version.workspace = true@$(grep '^version' Cargo.toml)@" \
pineappl_py/Cargo.toml
# the previous command is very fragile, so print the file contents to check it
cat pineappl_py/Cargo.toml
Expand Down

0 comments on commit 2d632d3

Please sign in to comment.