aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/bundle-otp
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bundle-otp')
-rwxr-xr-xscripts/bundle-otp29
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/bundle-otp b/scripts/bundle-otp
new file mode 100755
index 0000000000..f3ff632b63
--- /dev/null
+++ b/scripts/bundle-otp
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -e
+
+OTP_META_FILE=$ERL_TOP/${TRAVIS_TAG}-bundle.txt
+OTP_FILE=$ERL_TOP/${TRAVIS_TAG}-bundle.tar.gz
+
+REPOSITORIES="otp,$TRAVIS_TAG corba,.*"
+
+mkdir bundle
+
+for repo in $REPOSITORIES; do
+ OLD_IFS=$IFS
+ IFS=','
+ set -- $repo
+ IFS=$OLD_IFS
+ cd $ERL_TOP/bundle/
+ git clone https://github.com/erlang/$1 $1
+ cd $1
+ echo $1 $2
+ 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
+
+cd $ERL_TOP/bundle/
+tar czf $OTP_FILE *