2020-03-30 19:31:14 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# bump_version - increase the shared version and generate changelogs
|
|
|
|
|
|
|
|
set -o errexit
|
|
|
|
set -o pipefail
|
2021-12-13 01:28:28 +00:00
|
|
|
set -o xtrace
|
2020-03-30 19:31:14 +00:00
|
|
|
|
|
|
|
usage() {
|
2024-03-19 15:48:34 +00:00
|
|
|
echo -e "bump_version - increase the shared version"
|
2020-03-30 19:31:14 +00: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 15:48:34 +00:00
|
|
|
new_version_sed="$( cut -f1 -d'-' <<<"${new_version}" )"
|
2021-09-06 20:26:25 +00:00
|
|
|
|
|
|
|
# Bump the NPM version
|
2021-10-06 03:30:27 +00:00
|
|
|
npm --no-git-tag-version --allow-same-version version v${new_version_sed}
|
2020-03-30 19:31:14 +00:00
|
|
|
|
|
|
|
# Stage the changed files for commit
|
2021-12-13 01:28:28 +00:00
|
|
|
git add .
|
|
|
|
git status -v
|