summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-06-07 11:15:30 +0000
committerBill Wendling <isanbard@gmail.com>2013-06-07 11:15:30 +0000
commitab5ad9fe509a502ed375df30c0a4b0874c8c8502 (patch)
treefead04837a9465ffca667176c3178df8b78a6ef4 /utils
parent451ee21d14576dd30fd5e70f977d3fdfa3a758b9 (diff)
downloadllvm-ab5ad9fe509a502ed375df30c0a4b0874c8c8502.tar.gz
llvm-ab5ad9fe509a502ed375df30c0a4b0874c8c8502.tar.bz2
llvm-ab5ad9fe509a502ed375df30c0a4b0874c8c8502.tar.xz
Add a script to help us create source tar balls for the release.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183509 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rwxr-xr-xutils/release/export.sh83
1 files changed, 83 insertions, 0 deletions
diff --git a/utils/release/export.sh b/utils/release/export.sh
new file mode 100755
index 0000000000..f25a193747
--- /dev/null
+++ b/utils/release/export.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+#===-- tag.sh - Tag the LLVM release candidates ----------------------------===#
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License.
+#
+#===------------------------------------------------------------------------===#
+#
+# Create branches and release candidates for the LLVM release.
+#
+#===------------------------------------------------------------------------===#
+
+set -e
+
+projects="llvm cfe dragonegg test-suite compiler-rt libcxx clang-tools-extra polly lldb"
+base_url="https://llvm.org/svn/llvm-project"
+
+release=""
+rc=""
+
+function usage() {
+ echo "Export the SVN sources and build tarballs from them"
+ echo "usage: `basename $0`"
+ echo " "
+ echo " -release <num> The version number of the release"
+ echo " -rc <num> The release candidate number"
+ echo " -final The final tag"
+}
+
+function export_sources() {
+ release_no_dot=`echo $release | sed -e 's,\.,,g'`
+ tag_dir="tags/RELEASE_$release_no_dot/$rc"
+
+ if [ "$rc" = "final" ]; then
+ rc=""
+ fi
+
+ for proj in $projects; do
+ echo "Exporting $proj ..."
+ svn export \
+ $base_url/$proj/$tag_dir \
+ $proj-$release$rc.src
+
+ echo "Creating tarball ..."
+ tar cfz $proj-$release$rc.src.tar.gz $proj-$release$rc.src
+ done
+}
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ -release | --release )
+ shift
+ release=$1
+ ;;
+ -rc | --rc )
+ shift
+ rc="rc$1"
+ ;;
+ -final | --final )
+ rc="final"
+ ;;
+ -h | -help | --help )
+ usage
+ exit 0
+ ;;
+ * )
+ echo "unknown option: $1"
+ usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+if [ "x$release" = "x" ]; then
+ echo "error: need to specify a release version"
+ exit 1
+fi
+
+export_sources
+exit 0