diff options
| author | Tobias Bosch | 2014-01-09 14:39:48 -0800 | 
|---|---|---|
| committer | Tobias Bosch | 2014-01-09 14:59:55 -0800 | 
| commit | 9ddef840b665bd94a49102a4e3dbc433f7b29b9a (patch) | |
| tree | 68baa133bd27fde473bd700c15532ca26347cf5f /scripts/jenkins | |
| parent | 28fc80bba0107075ab371fd0a7634a38891626b2 (diff) | |
| download | angular.js-9ddef840b665bd94a49102a4e3dbc433f7b29b9a.tar.bz2 | |
chore(build): add relase-after-cdn script
Diffstat (limited to 'scripts/jenkins')
| -rwxr-xr-x | scripts/jenkins/release-after-cdn.sh | 39 | ||||
| -rwxr-xr-x | scripts/jenkins/release.sh | 3 | 
2 files changed, 42 insertions, 0 deletions
| diff --git a/scripts/jenkins/release-after-cdn.sh b/scripts/jenkins/release-after-cdn.sh new file mode 100755 index 00000000..7623e177 --- /dev/null +++ b/scripts/jenkins/release-after-cdn.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +ARG_DEFS=( +  # require the git dryrun flag so the script can't be run without +  # thinking about this! +  "--git-push-dryrun=(true|false)" +) + +function findLatestRelease { +  # returns e.g. v1.2.7 +  LATEST_TAG=$(git describe --abbrev=0 --tags) +  # returns e.g. 1.2.7 +  echo ${LATEST_TAG:1} +} + +function init { +  NG_ARGS=("$@") +  if [[ ! $VERBOSE ]]; then +    VERBOSE=false +  fi +  VERBOSE_ARG="--verbose=$VERBOSE" +} + +function phase { +  ACTION_ARG="--action=$1" +  CDN_VERSION_ARG="--cdn-version=$LATEST_VERSION" +  ./scripts/angular.js/publish-cdn-version.sh $ACTION_ARG $CDN_VERSION_ARG $VERBOSE_ARG +  ./scripts/angularjs.org/publish.sh $ACTION_ARG $CDN_VERSION_ARG $VERBOSE_ARG +} + +function run { +  cd ../.. +  LATEST_VERSION=$(findLatestRelease) + +  phase prepare +  phase publish +} + +source $(dirname $0)/../utils.inc
\ No newline at end of file diff --git a/scripts/jenkins/release.sh b/scripts/jenkins/release.sh index 1b1bd26e..744a1a28 100755 --- a/scripts/jenkins/release.sh +++ b/scripts/jenkins/release.sh @@ -7,6 +7,9 @@ echo "#################################"  ARG_DEFS=(    "--next-version-type=(patch|minor|major)"    "--next-version-name=(.+)" +  # require the git dryrun flag so the script can't be run without +  # thinking about this! +  "--git-push-dryrun=(true|false)"    "[--no-test=(true|false)]"  ) | 
