Skip to content

Commit

Permalink
fix: use sed instead of gsed
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-bahjati committed Jul 26, 2024
1 parent 1bd3317 commit d873725
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/increment-cargo-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ for Cargo_toml in "${Cargo_tomls[@]}"; do
# Set new crate version
(
set -x
gsed -i "$Cargo_toml" -e "0,/^version =/{s/^version = \"[^\"]*\"$/version = \"$newVersion\"/}"
sed -i "$Cargo_toml" -e "0,/^version =/{s/^version = \"[^\"]*\"$/version = \"$newVersion\"/}"
)

# Fix up the version references to other internal crates
for crate in "${crates[@]}"; do
(
set -x
gsed -i "$Cargo_toml" -e "
sed -i "$Cargo_toml" -e "
s/^$crate = { *path *= *\"\([^\"]*\)\" *, *version *= *\"[^\"]*\"\(.*\)} *\$/$crate = \{ path = \"\1\", version = \"=$newVersion\"\2\}/
"
)
Expand Down

0 comments on commit d873725

Please sign in to comment.