From 11d18e03ce24897ccd827ef0a2ef1d5fd26cd5f5 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Wed, 9 Oct 2019 06:59:20 -0700 Subject: [PATCH] chore: enhance bump script to default to a minor version bump (#4389) * chore: enhance bump script to default to a minor version bump Also supports any semVer string as input for scenarios where we want to release patches, major versions, etc. Made a switch to use standard-version to create a commit at the end of the bump. standard-version also takes care of the CHANGELOG generation now. * use npx to execute standard-version --- bump.sh | 34 +++--- package-lock.json | 256 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 8 ++ 3 files changed, 283 insertions(+), 15 deletions(-) diff --git a/bump.sh b/bump.sh index 6cb4a96636452..8994cc81a4962 100755 --- a/bump.sh +++ b/bump.sh @@ -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 +# +# 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 " - 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 <