2013-06-07 19:15:30 +08:00
|
|
|
#!/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
|
|
|
|
|
2015-07-18 00:49:59 +08:00
|
|
|
projects="llvm cfe test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp libunwind"
|
2013-06-07 19:15:30 +08:00
|
|
|
base_url="https://llvm.org/svn/llvm-project"
|
|
|
|
|
|
|
|
release=""
|
|
|
|
rc=""
|
|
|
|
|
2016-01-16 23:18:35 +08:00
|
|
|
usage() {
|
2013-06-07 19:15:30 +08:00
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
2016-01-16 23:18:35 +08:00
|
|
|
export_sources() {
|
2013-06-07 19:15:30 +08:00
|
|
|
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 ..."
|
2014-08-26 16:11:22 +08:00
|
|
|
tar cfJ $proj-$release$rc.src.tar.xz $proj-$release$rc.src
|
2013-06-07 19:15:30 +08:00
|
|
|
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
|
|
|
|
|
2015-03-03 01:30:42 +08:00
|
|
|
# Make sure umask is not overly restrictive.
|
|
|
|
umask 0022
|
|
|
|
|
2013-06-07 19:15:30 +08:00
|
|
|
export_sources
|
|
|
|
exit 0
|