Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions bump.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
#!/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
ver=${1:-}
if [ -z "${ver}" ]; then
echo "usage: ./bump.sh <version>"
exit 1
fi
version=${1:-minor}

echo "Starting ${version} version bump"

export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}"

/bin/bash ./install.sh

npx lerna version --force-publish=* --no-git-tag-version --no-push ${ver}

# Update CHANGELOG.md only at the root
cat > /tmp/context.json <<HERE
{
"version": "${ver}"
}
HERE
npx lerna version ${version} --force-publish=* --no-git-tag-version --no-push

# Another round of install to fix package-lock.jsons
/bin/bash ./install.sh

./node_modules/.bin/conventional-changelog -p angular -i CHANGELOG.md -s --context /tmp/context.json

# align "peerDependencies" to actual dependencies after bump
# this is technically only required for major version bumps, but in the meantime we shall do it in every bump
/bin/bash scripts/fix-peer-deps.sh

# Generate CHANGELOG and create a commit
npx standard-version --release --skip.tag=true --commit-all
256 changes: 256 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"lerna": "^3.16.5",
"nodeunit": "^0.11.3",
"nyc": "^14.1.1",
"standard-version": "^7.0.0",
"ts-jest": "^24.1.0",
"tslint": "^5.20.0",
"typescript": "~3.6.3"
Expand All @@ -26,6 +27,13 @@
"type": "git",
"url": "git://github.com/aws/aws-cdk"
},
"standard-version": {
"releaseCommitMessageFormat": "{{currentTag}}",
"scripts": {
"prebump": "echo $(node -pe \"require('./lerna.json').version\")",
"precommit": "git add ."
}
},
"license": "Apache-2.0",
"author": {
"name": "Amazon Web Services",
Expand Down