a0488b30a7
This commit gets rid of all references to Travis and, belatedly, Jenkins. Now all CI is done on CircleCI and releases are run locally. The CI no longer updates the docs and code.angularjs.org for jobs that are not on the `master` branch. During releases, the docs and code should be uploaded manually.
42 lines
927 B
Bash
Executable File
42 lines
927 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Tags a release
|
|
|
|
echo "#################################"
|
|
echo "## Tag angular.js for a release #"
|
|
echo "#################################"
|
|
|
|
ARG_DEFS=(
|
|
"--action=(prepare|publish)"
|
|
"--commit-sha=(.*)"
|
|
# the version number of the release.
|
|
# e.g. 1.2.12 or 1.2.12-rc.1
|
|
"--version-number=([0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?)"
|
|
"--version-name=(.+)"
|
|
)
|
|
|
|
function checkVersionNumber() {
|
|
BRANCH_PATTERN=$(readJsonProp "package.json" "branchPattern")
|
|
if [[ $VERSION_NUMBER != $BRANCH_PATTERN ]]; then
|
|
echo "version-number needs to match $BRANCH_PATTERN on this branch"
|
|
usage
|
|
fi
|
|
}
|
|
|
|
function init {
|
|
cd ../..
|
|
checkVersionNumber
|
|
TAG_NAME="v$VERSION_NUMBER"
|
|
}
|
|
|
|
function prepare() {
|
|
git tag "$TAG_NAME" -m "chore(release): $TAG_NAME codename($VERSION_NAME)" "$COMMIT_SHA"
|
|
}
|
|
|
|
function publish() {
|
|
# push the tag to github
|
|
git push origin $TAG_NAME
|
|
}
|
|
|
|
source $(dirname $0)/../utils.inc
|