forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bump.sh
executable file
·33 lines (29 loc) · 1.18 KB
/
bump.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# --------------------------------------------------------------------------------------------------
#
# This script is intended to be used to bump the version of the CDK modules, update package.json,
# package-lock.json, and create a commit.
#
# to start a version bump, run:
# bump.sh <version | version Type>
#
# If a version is not provided, the 'minor' version will be bumped.
# The version can be an explicit version _or_ one of:
# 'major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', or 'prerelease'.
#
# --------------------------------------------------------------------------------------------------
set -euo pipefail
version=${1:-minor}
echo "Starting ${version} version bump"
# /bin/bash ./install.sh
# Generate CHANGELOG and create a commit (see .versionrc.json)
npx standard-version --release-as ${version}
# I am sorry.
#
# I've gone diving through the code of `conventional-changelog` to see if there
# was a way to configure the string and ultimately I decided that a 'sed' was the simpler
# way to go.
sed -i.tmp -e 's/BREAKING CHANGES$/BREAKING CHANGES TO EXPERIMENTAL FEATURES/' CHANGELOG.md
rm CHANGELOG.md.tmp
git add CHANGELOG.md
git commit --amend --no-edit