mirror of
https://github.com/actix/actix-web.git
synced 2024-11-25 19:11:10 +00:00
bump script updates referenced crate versions
This commit is contained in:
parent
f62383a975
commit
65dd5dfa7b
1 changed files with 27 additions and 2 deletions
29
scripts/bump
29
scripts/bump
|
@ -82,8 +82,33 @@ rm -f $README_FILE.bak
|
|||
echo "manifest, changelog, and readme updated"
|
||||
echo
|
||||
echo "check other references:"
|
||||
rg "$PACKAGE_NAME =" || true
|
||||
rg "package = \"$PACKAGE_NAME\"" || true
|
||||
rg --glob='**/Cargo.toml' "\
|
||||
${PACKAGE_NAME} ?= ?\"[^\"]+\"\
|
||||
|${PACKAGE_NAME} ?=.*version ?= ?\"([^\"]+)\"\
|
||||
|package ?= ?\"${PACKAGE_NAME}\".*version ?= ?\"([^\"]+)\"\
|
||||
|version ?= ?\"([^\"]+)\".*package ?= ?\"${PACKAGE_NAME}\"" || true
|
||||
|
||||
echo
|
||||
read -p "Update all references: (y/N) " UPDATE_REFERENCES
|
||||
UPDATE_REFERENCES="${UPDATE_REFERENCES:-n}"
|
||||
|
||||
if [ "$UPDATE_REFERENCES" = 'y' ] || [ "$UPDATE_REFERENCES" = 'Y' ]; then
|
||||
|
||||
for f in $(fd Cargo.toml); do
|
||||
sed -i.bak -E \
|
||||
"s/^(${PACKAGE_NAME} ?= ?\")[^\"]+(\")$/\1${NEW_VERSION}\2/g" $f
|
||||
sed -i.bak -E \
|
||||
"s/^(${PACKAGE_NAME} ?=.*version ?= ?\")[^\"]+(\".*)$/\1${NEW_VERSION}\2/g" $f
|
||||
sed -i.bak -E \
|
||||
"s/^(.*package ?= ?\"${PACKAGE_NAME}\".*version ?= ?\")[^\"]+(\".*)$/\1${NEW_VERSION}\2/g" $f
|
||||
sed -i.bak -E \
|
||||
"s/^(.*version ?= ?\")[^\"]+(\".*package ?= ?\"${PACKAGE_NAME}\".*)$/\1${NEW_VERSION}\2/g" $f
|
||||
|
||||
# remove backup file
|
||||
rm -f $f.bak
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
if [ $MACOS ]; then
|
||||
printf "prepare $PACKAGE_NAME release $NEW_VERSION" | pbcopy
|
||||
|
|
Loading…
Reference in a new issue