diff options
Diffstat (limited to 'scripts/bundle-otp')
-rwxr-xr-x | scripts/bundle-otp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/bundle-otp b/scripts/bundle-otp index f3ff632b63..aa1f166732 100755 --- a/scripts/bundle-otp +++ b/scripts/bundle-otp @@ -2,6 +2,10 @@ set -e +if [ "$TRAVIS_PULL_REQUEST" = "false" -a "$TRAVIS_REPO_SLUG" != "erlang/otp" ]; then + exit 0 +fi + OTP_META_FILE=$ERL_TOP/${TRAVIS_TAG}-bundle.txt OTP_FILE=$ERL_TOP/${TRAVIS_TAG}-bundle.tar.gz @@ -9,6 +13,9 @@ REPOSITORIES="otp,$TRAVIS_TAG corba,.*" mkdir bundle +## Turn off * expansion, needed for the .* regexp to work +set -f + for repo in $REPOSITORIES; do OLD_IFS=$IFS IFS=',' @@ -18,12 +25,17 @@ for repo in $REPOSITORIES; do git clone https://github.com/erlang/$1 $1 cd $1 echo $1 $2 - TAG=`git tag -l | grep -P "$2" | sort -V | tail -1` + TAG=`git tag -l | grep -P "^$2$" | sort -V | tail -1` git checkout $TAG SHA=`git rev-parse --verify HEAD` rm -rf .git echo "$1 $TAG $SHA" >> $OTP_META_FILE done +## Turn on * expansion +set +f + cd $ERL_TOP/bundle/ tar czf $OTP_FILE * + +exit 0 |