2020-03-30 12:31:14 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# bump_version - increase the shared version and generate changelogs
|
|
|
|
|
|
|
|
set -o errexit
|
|
|
|
set -o pipefail
|
2021-12-12 18:28:28 -07:00
|
|
|
set -o xtrace
|
2020-03-30 12:31:14 -07:00
|
|
|
|
|
|
|
usage() {
|
2024-03-19 08:48:34 -07:00
|
|
|
echo -e "bump_version - increase the shared version"
|
2020-03-30 12:31:14 -07:00
|
|
|
echo -e ""
|
|
|
|
echo -e "Usage:"
|
|
|
|
echo -e " $ bump_version <new_version>"
|
|
|
|
}
|
|
|
|
|
|
|
|
if [[ -z $1 ]]; then
|
|
|
|
usage
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
new_version="$1"
|
2024-03-19 08:48:34 -07:00
|
|
|
new_version_sed="$( cut -f1 -d'-' <<<"${new_version}" )"
|
2021-09-06 13:26:25 -07:00
|
|
|
|
|
|
|
# Bump the NPM version
|
2021-10-05 20:30:27 -07:00
|
|
|
npm --no-git-tag-version --allow-same-version version v${new_version_sed}
|
2020-03-30 12:31:14 -07:00
|
|
|
|
|
|
|
# Stage the changed files for commit
|
2021-12-12 18:28:28 -07:00
|
|
|
git add .
|
|
|
|
git status -v
|