1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Release script tweaks

- be more helpful if update_changelog is not installed
- behave sanely if v is omitted on tag arg
This commit is contained in:
Richard van der Hoff
2016-03-23 14:50:03 +00:00
parent cfc10fa82d
commit cdea96fa0a

View File

@@ -3,7 +3,7 @@
# Script to perform a release of matrix-js-sdk. Performs the steps documented
# in RELEASING.md
#
# Requires githib-changelog-generator; to install, do
# Requires github-changelog-generator; to install, do
# pip install git+https://github.com/matrix-org/github-changelog-generator.git
set -e
@@ -47,21 +47,19 @@ if [ $# -ne 1 ]; then
exit 1
fi
tag="$1"
case "$tag" in
v*) ;;
*)
echo 2>&1 "Tag $tag must start with v"
exit 1
;;
esac
# strip leading 'v' to get release
release="${tag#v}"
# ignore leading v on release
release="${1#v}"
tag="v${release}"
rel_branch="release-$tag"
if [ -z "$skip_changelog" ]; then
if ! command -v update_changelog >/dev/null 2>&1; then
echo "release.sh requires github-changelog-generator. Try:" >&2
echo " pip install git+https://github.com/matrix-org/github-changelog-generator.git" >&2
exit 1
fi
fi
# we might already be on the release branch, in which case, yay
if [ $(git symbolic-ref --short HEAD) != "$rel_branch" ]; then
echo "Creating release branch"
@@ -79,6 +77,8 @@ if [ -z "$skip_changelog" ]; then
fi
fi
set -x
# Bump package.json, build the dist, and tag
echo "npm version"
npm version "$release"