2023-07-17 16:53:26 -05:00
|
|
|
#!/bin/bash
|
2023-09-16 13:02:35 -05:00
|
|
|
|
|
|
|
# Fail out if any step has an error
|
2023-07-16 13:35:51 -05:00
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ "$1" == "patch" ]; then
|
|
|
|
echo Bumping patch version
|
2023-07-16 13:51:12 -05:00
|
|
|
PART=patch
|
2023-07-16 13:35:51 -05:00
|
|
|
elif [ "$1" == "minor" ]; then
|
|
|
|
echo Bumping minor version
|
2023-07-16 13:51:12 -05:00
|
|
|
PART=minor
|
2023-07-16 13:35:51 -05:00
|
|
|
elif [ "$1" == "major" ]; then
|
|
|
|
echo Bumping major version
|
2023-07-16 13:51:12 -05:00
|
|
|
PART=major
|
|
|
|
else
|
|
|
|
echo Unsupported part! Specify 'patch', 'minor', or 'major'
|
|
|
|
exit 1
|
2023-07-16 13:35:51 -05:00
|
|
|
fi
|
|
|
|
|
2023-09-16 13:02:35 -05:00
|
|
|
# Change version of crates and packages everywhere
|
2023-07-16 14:04:00 -05:00
|
|
|
bumpversion $PART
|
2023-09-16 13:02:35 -05:00
|
|
|
|
|
|
|
# Get the new version we bumped to
|
|
|
|
NEW_VERSION=$(cat .bumpversion.cfg | grep current_version\ = | cut -d\ -f3)
|
|
|
|
echo NEW_VERSION=$NEW_VERSION
|
|
|
|
|
|
|
|
# Update crate dependencies for the crates we publish
|
2023-09-16 13:07:21 -05:00
|
|
|
cargo upgrade -p veilid-tools@$NEW_VERSION -p veilid-core@$NEW_VERSION
|
2023-09-16 13:02:35 -05:00
|
|
|
|
|
|
|
# Update lockfile
|
2023-07-19 12:01:55 -05:00
|
|
|
cargo update
|