2 #===-- tag.sh - Tag the LLVM release candidates ----------------------------===#
4 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 # See https://llvm.org/LICENSE.txt for license information.
6 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 #===------------------------------------------------------------------------===#
10 # Create branches and release candidates for the LLVM release.
12 #===------------------------------------------------------------------------===#
16 projects
="llvm cfe test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp libunwind"
17 base_url
="https://llvm.org/svn/llvm-project"
23 echo "Export the SVN sources and build tarballs from them"
24 echo "usage: `basename $0`"
26 echo " -release <num> The version number of the release"
27 echo " -rc <num> The release candidate number"
28 echo " -final The final tag"
32 release_no_dot
=`echo $release | sed -e 's,\.,,g'`
33 tag_dir
="tags/RELEASE_$release_no_dot/$rc"
35 if [ "$rc" = "final" ]; then
39 for proj
in $projects; do
40 echo "Exporting $proj ..."
42 $base_url/$proj/$tag_dir \
45 echo "Creating tarball ..."
46 tar cfJ
$proj-$release$rc.src.
tar.xz
$proj-$release$rc.src
50 while [ $# -gt 0 ]; do
52 -release |
--release )
68 echo "unknown option: $1"
76 if [ "x$release" = "x" ]; then
77 echo "error: need to specify a release version"
81 # Make sure umask is not overly restrictive.