Imported Upstream version 5.18.0.207

Former-commit-id: 3b152f462918d427ce18620a2cbe4f8b79650449
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-11-17 08:23:10 +00:00
parent 8e12397d70
commit eb85e2fc17
28480 changed files with 72 additions and 3866936 deletions

View File

@ -1,112 +0,0 @@
@echo off
setlocal
REM Script for building the LLVM installer on Windows,
REM used for the the weekly snapshots at http://www.llvm.org/builds.
REM
REM Usage: build_llvm_package.bat <revision>
REM Prerequisites:
REM
REM Visual Studio 2017, CMake, Ninja, SVN, GNUWin32, SWIG, Python 3,
REM NSIS with the strlen_8192 patch,
REM Visual Studio 2017 SDK and Nuget (for the clang-format plugin),
REM Perl (for the OpenMP run-time).
REM
REM
REM For LLDB, SWIG version <= 3.0.8 needs to be used to work around
REM https://github.com/swig/swig/issues/769
REM You need to modify the paths below:
set vsdevcmd=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat
set python32_dir=C:\Users\%USER%\AppData\Local\Programs\Python\Python35-32
set python64_dir=C:\Users\%USER%\AppData\Local\Programs\Python\Python35
set revision=%1
set branch=trunk
set package_version=6.0.0-r%revision%
set clang_format_vs_version=6.0.0.%revision%
set build_dir=llvm_package_%revision%
echo Branch: %branch%
echo Revision: %revision%
echo Package version: %package_version%
echo Clang format plugin version: %clang_format_vs_version%
echo Build dir: %build_dir%
echo.
pause
mkdir %build_dir%
cd %build_dir%
echo Checking out %branch% at r%revision%...
svn.exe export -r %revision% http://llvm.org/svn/llvm-project/llvm/%branch% llvm || exit /b
svn.exe export -r %revision% http://llvm.org/svn/llvm-project/cfe/%branch% llvm/tools/clang || exit /b
svn.exe export -r %revision% http://llvm.org/svn/llvm-project/clang-tools-extra/%branch% llvm/tools/clang/tools/extra || exit /b
svn.exe export -r %revision% http://llvm.org/svn/llvm-project/lld/%branch% llvm/tools/lld || exit /b
svn.exe export -r %revision% http://llvm.org/svn/llvm-project/compiler-rt/%branch% llvm/projects/compiler-rt || exit /b
svn.exe export -r %revision% http://llvm.org/svn/llvm-project/openmp/%branch% llvm/projects/openmp || exit /b
svn.exe export -r %revision% http://llvm.org/svn/llvm-project/lldb/%branch% llvm/tools/lldb || exit /b
REM Setting CMAKE_CL_SHOWINCLUDES_PREFIX to work around PR27226.
set cmake_flags=-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON -DCMAKE_INSTALL_UCRT_LIBRARIES=ON -DCLANG_FORMAT_VS_VERSION=%clang_format_vs_version% -DPACKAGE_VERSION=%package_version% -DLLDB_RELOCATABLE_PYTHON=1 -DLLDB_TEST_COMPILER=%cd%\build32_stage0\bin\clang.exe -DCMAKE_CL_SHOWINCLUDES_PREFIX="Note: including file: "
REM TODO: Run all tests, including lld and compiler-rt.
call "%vsdevcmd%" -arch=x86
set CC=
set CXX=
mkdir build32_stage0
cd build32_stage0
cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python32_dir% ..\llvm || exit /b
ninja all || exit /b
ninja check || ninja check || ninja check || exit /b
ninja check-clang || ninja check-clang || ninja check-clang || exit /b
cd..
mkdir build32
cd build32
set CC=..\build32_stage0\bin\clang-cl
set CXX=..\build32_stage0\bin\clang-cl
cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python32_dir% ..\llvm || exit /b
ninja all || exit /b
ninja check || ninja check || ninja check || exit /b
ninja check-clang || ninja check-clang || ninja check-clang || exit /b
ninja package || exit /b
cd ..
REM The plug-in is built separately as it uses a statically linked clang-format.exe.
mkdir build_vsix
cd build_vsix
set CC=..\build32_stage0\bin\clang-cl
set CXX=..\build32_stage0\bin\clang-cl
cmake -GNinja %cmake_flags% -DLLVM_USE_CRT_RELEASE=MT -DBUILD_CLANG_FORMAT_VS_PLUGIN=ON -DPYTHON_HOME=%python32_dir% ..\llvm || exit /b
ninja clang_format_vsix || exit /b
copy ..\llvm\tools\clang\tools\clang-format-vs\ClangFormat\bin\Release\ClangFormat.vsix ClangFormat-r%revision%.vsix
cd ..
call "%vsdevcmd%" -arch=amd64
set CC=
set CXX=
mkdir build64_stage0
cd build64_stage0
cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python64_dir% ..\llvm || exit /b
ninja all || exit /b
ninja check || ninja check || ninja check || exit /b
ninja check-clang || ninja check-clang || ninja check-clang || exit /b
cd..
mkdir build64
cd build64
set CC=..\build64_stage0\bin\clang-cl
set CXX=..\build64_stage0\bin\clang-cl
cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python64_dir% ..\llvm || exit /b
ninja all || exit /b
ninja check || ninja check || ninja check || exit /b
ninja check-clang || ninja check-clang || ninja check-clang || exit /b
ninja package || exit /b
cd ..

View File

@ -1,86 +0,0 @@
#!/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 test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp libunwind"
base_url="https://llvm.org/svn/llvm-project"
release=""
rc=""
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"
}
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 cfJ $proj-$release$rc.src.tar.xz $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
# Make sure umask is not overly restrictive.
umask 0022
export_sources
exit 0

View File

@ -1,130 +0,0 @@
#!/usr/bin/env python
import re, string, sys, os, time
DEBUG = 0
testDirName = 'llvm-test'
test = ['compile', 'llc', 'jit', 'cbe']
exectime = ['llc-time', 'jit-time', 'cbe-time',]
comptime = ['llc', 'jit-comptime', 'compile']
(tp, exp) = ('compileTime_', 'executeTime_')
def parse(file):
f=open(file, 'r')
d = f.read()
#Cleanup weird stuff
d = re.sub(r',\d+:\d','', d)
r = re.findall(r'TEST-(PASS|FAIL|RESULT.*?):\s+(.*?)\s+(.*?)\r*\n', d)
test = {}
fname = ''
for t in r:
if DEBUG:
print t
if t[0] == 'PASS' or t[0] == 'FAIL' :
tmp = t[2].split(testDirName)
if DEBUG:
print tmp
if len(tmp) == 2:
fname = tmp[1].strip('\r\n')
else:
fname = tmp[0].strip('\r\n')
if not test.has_key(fname) :
test[fname] = {}
for k in test:
test[fname][k] = 'NA'
test[fname][t[1]] = t[0]
if DEBUG:
print test[fname][t[1]]
else :
try:
n = t[0].split('RESULT-')[1]
if DEBUG:
print n;
if n == 'llc' or n == 'jit-comptime' or n == 'compile':
test[fname][tp + n] = float(t[2].split(' ')[2])
if DEBUG:
print test[fname][tp + n]
elif n.endswith('-time') :
test[fname][exp + n] = float(t[2].strip('\r\n'))
if DEBUG:
print test[fname][exp + n]
else :
print "ERROR!"
sys.exit(1)
except:
continue
return test
# Diff results and look for regressions.
def diffResults(d_old, d_new):
for t in sorted(d_old.keys()) :
if DEBUG:
print t
if d_new.has_key(t) :
# Check if the test passed or failed.
for x in test:
if d_old[t].has_key(x):
if d_new[t].has_key(x):
if d_old[t][x] == 'PASS':
if d_new[t][x] != 'PASS':
print t + " *** REGRESSION (" + x + ")\n"
else:
if d_new[t][x] == 'PASS':
print t + " * NEW PASS (" + x + ")\n"
else :
print t + "*** REGRESSION (" + x + ")\n"
# For execution time, if there is no result, its a fail.
for x in exectime:
if d_old[t].has_key(tp + x):
if not d_new[t].has_key(tp + x):
print t + " *** REGRESSION (" + tp + x + ")\n"
else :
if d_new[t].has_key(tp + x):
print t + " * NEW PASS (" + tp + x + ")\n"
for x in comptime:
if d_old[t].has_key(exp + x):
if not d_new[t].has_key(exp + x):
print t + " *** REGRESSION (" + exp + x + ")\n"
else :
if d_new[t].has_key(exp + x):
print t + " * NEW PASS (" + exp + x + ")\n"
else :
print t + ": Removed from test-suite.\n"
#Main
if len(sys.argv) < 3 :
print 'Usage:', sys.argv[0], \
'<old log> <new log>'
sys.exit(-1)
d_old = parse(sys.argv[1])
d_new = parse(sys.argv[2])
diffResults(d_old, d_new)

View File

@ -1,158 +0,0 @@
#!/usr/bin/env python
import re, string, sys, os, time, math
DEBUG = 0
(tp, exp) = ('compile', 'exec')
def parse(file):
f = open(file, 'r')
d = f.read()
# Cleanup weird stuff
d = re.sub(r',\d+:\d', '', d)
r = re.findall(r'TEST-(PASS|FAIL|RESULT.*?):\s+(.*?)\s+(.*?)\r*\n', d)
test = {}
fname = ''
for t in r:
if DEBUG:
print t
if t[0] == 'PASS' or t[0] == 'FAIL' :
tmp = t[2].split('llvm-test/')
if DEBUG:
print tmp
if len(tmp) == 2:
fname = tmp[1].strip('\r\n')
else:
fname = tmp[0].strip('\r\n')
if not test.has_key(fname):
test[fname] = {}
test[fname][t[1] + ' state'] = t[0]
test[fname][t[1] + ' time'] = float('nan')
else :
try:
n = t[0].split('RESULT-')[1]
if DEBUG:
print "n == ", n;
if n == 'compile-success':
test[fname]['compile time'] = float(t[2].split('program')[1].strip('\r\n'))
elif n == 'exec-success':
test[fname]['exec time'] = float(t[2].split('program')[1].strip('\r\n'))
if DEBUG:
print test[fname][string.replace(n, '-success', '')]
else :
# print "ERROR!"
sys.exit(1)
except:
continue
return test
# Diff results and look for regressions.
def diffResults(d_old, d_new):
regressions = {}
passes = {}
removed = ''
for x in ['compile state', 'compile time', 'exec state', 'exec time']:
regressions[x] = ''
passes[x] = ''
for t in sorted(d_old.keys()) :
if d_new.has_key(t):
# Check if the test passed or failed.
for x in ['compile state', 'compile time', 'exec state', 'exec time']:
if not d_old[t].has_key(x) and not d_new[t].has_key(x):
continue
if d_old[t].has_key(x):
if d_new[t].has_key(x):
if d_old[t][x] == 'PASS':
if d_new[t][x] != 'PASS':
regressions[x] += t + "\n"
else:
if d_new[t][x] == 'PASS':
passes[x] += t + "\n"
else :
regressions[x] += t + "\n"
if x == 'compile state' or x == 'exec state':
continue
# For execution time, if there is no result it's a fail.
if not d_old[t].has_key(x) and not d_new[t].has_key(x):
continue
elif not d_new[t].has_key(x):
regressions[x] += t + "\n"
elif not d_old[t].has_key(x):
passes[x] += t + "\n"
if math.isnan(d_old[t][x]) and math.isnan(d_new[t][x]):
continue
elif math.isnan(d_old[t][x]) and not math.isnan(d_new[t][x]):
passes[x] += t + "\n"
elif not math.isnan(d_old[t][x]) and math.isnan(d_new[t][x]):
regressions[x] += t + ": NaN%\n"
if d_new[t][x] > d_old[t][x] and d_old[t][x] > 0.0 and \
(d_new[t][x] - d_old[t][x]) / d_old[t][x] > .05:
regressions[x] += t + ": " + "{0:.1f}".format(100 * (d_new[t][x] - d_old[t][x]) / d_old[t][x]) + "%\n"
else :
removed += t + "\n"
if len(regressions['compile state']) != 0:
print 'REGRESSION: Compilation Failed'
print regressions['compile state']
if len(regressions['exec state']) != 0:
print 'REGRESSION: Execution Failed'
print regressions['exec state']
if len(regressions['compile time']) != 0:
print 'REGRESSION: Compilation Time'
print regressions['compile time']
if len(regressions['exec time']) != 0:
print 'REGRESSION: Execution Time'
print regressions['exec time']
if len(passes['compile state']) != 0:
print 'NEW PASSES: Compilation'
print passes['compile state']
if len(passes['exec state']) != 0:
print 'NEW PASSES: Execution'
print passes['exec state']
if len(removed) != 0:
print 'REMOVED TESTS'
print removed
# Main
if len(sys.argv) < 3 :
print 'Usage:', sys.argv[0], '<old log> <new log>'
sys.exit(-1)
d_old = parse(sys.argv[1])
d_new = parse(sys.argv[2])
diffResults(d_old, d_new)

View File

@ -1,208 +0,0 @@
# !/bin/bash
#===-- merge-request.sh ---------------------------------------------------===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License.
#
#===------------------------------------------------------------------------===#
#
# Submit a merge request to bugzilla.
#
#===------------------------------------------------------------------------===#
dryrun=""
stable_version=""
revisions=""
BUGZILLA_BIN=""
BUGZILLA_CMD=""
release_metabug=""
bugzilla_product="new-bugs"
bugzilla_component="new bugs"
bugzilla_assigned_to=""
bugzilla_user=""
bugzilla_version=""
bugzilla_url="https://bugs.llvm.org/xmlrpc.cgi"
function usage() {
echo "usage: `basename $0` -user EMAIL -stable-version X.Y -r NUM"
echo ""
echo " -user EMAIL Your email address for logging into bugzilla."
echo " -stable-version X.Y The stable release version (e.g. 4.0, 5.0)."
echo " -r NUM Revision number to merge (e.g. 1234567)."
echo " This option can be specified multiple times."
echo " -bugzilla-bin PATH Path to bugzilla binary (optional)."
echo " -assign-to EMAIL Assign bug to user with EMAIL (optional)."
echo " -dry-run Print commands instead of executing them."
}
while [ $# -gt 0 ]; do
case $1 in
-user)
shift
bugzilla_user="$1"
;;
-stable-version)
shift
stable_version="$1"
;;
-r)
shift
revisions="$revisions $1"
;;
-project)
shift
project="$1"
;;
-component)
shift
bugzilla_component="$1"
;;
-bugzilla-bin)
shift
BUGZILLA_BIN="$1"
;;
-assign-to)
shift
bugzilla_assigned_to="--assigned_to=$1"
;;
-dry-run)
dryrun="echo"
;;
-help | --help | -h | --h | -\? )
usage
exit 0
;;
* )
echo "unknown option: $1"
usage
exit 1
;;
esac
shift
done
if [ -z "$stable_version" ]; then
echo "error: no stable version specified"
exit 1
fi
case $stable_version in
4.0)
release_metabug="32061"
;;
5.0)
release_metabug="34492"
;;
*)
echo "error: invalid stable version"
exit 1
esac
bugzilla_version=$stable_version
if [ -z "$revisions" ]; then
echo "error: no revisions specified"
exit 1
fi
if [ -z "$bugzilla_user" ]; then
echo "error: bugzilla username not specified."
exit 1
fi
if [ -z "$BUGZILLA_BIN" ]; then
BUGZILLA_BIN=`which bugzilla`
if [ $? -ne 0 ]; then
echo "error: could not find bugzilla executable."
echo "Make sure the bugzilla cli tool is installed on your system: "
echo "pip install python-bugzilla (recommended)"
echo ""
echo "Fedora: dnf install python-bugzilla"
echo "Ubuntu/Debian: apt-get install bugzilla-cli"
exit 1
fi
fi
BUGZILLA_MAJOR_VERSION=`$BUGZILLA_BIN --version 2>&1 | cut -d . -f 1`
if [ $BUGZILLA_MAJOR_VERSION -eq 1 ]; then
echo "***************************** Error ** ********************************"
echo "You are using an older version of the bugzilla cli tool, which is not "
echo "supported. You need to use bugzilla cli version 2.0.0 or higher:"
echo "***********************************************************************"
exit 1
fi
BUGZILLA_CMD="$BUGZILLA_BIN --bugzilla=$bugzilla_url"
rev_string=""
for r in $revisions; do
rev_string="$rev_string r$r"
done
echo "Checking for duplicate bugs..."
check_duplicates=`$BUGZILLA_CMD query --blocked=$release_metabug --field="cf_fixed_by_commits=$rev_string"`
if [ -n "$check_duplicates" ]; then
echo "Duplicate bug found:"
echo $check_duplicates
exit 1
fi
echo "Done"
# Get short commit summary. To avoid having a huge summary, we just
# use the commit message for the first commit.
commit_summary=''
for r in $revisions; do
commit_msg=`svn log -r $r https://llvm.org/svn/llvm-project/`
if [ $? -ne 0 ]; then
echo "warning: failed to get commit message."
commit_msg=""
fi
break
done
if [ -n "$commit_msg" ]; then
commit_summary=`echo "$commit_msg" | sed '4q;d' | cut -c1-80`
commit_summary=" : ${commit_summary}"
fi
bug_summary="Merge${rev_string} into the $stable_version branch${commit_summary}"
set -x
# Login to bugzilla
$BUGZILLA_CMD login $bugzilla_user
bug_id=`${dryrun} $BUGZILLA_CMD --ensure-logged-in new \
-p "$bugzilla_product" \
-c "$bugzilla_component" --blocked=$release_metabug \
-o All --priority=P --arch All -v $bugzilla_version \
--field="cf_fixed_by_commits=$rev_string" \
--summary "${bug_summary}" \
-l "Is it OK to merge the following revision(s) to the $stable_version branch?" \
$bugzilla_assigned_to \
-i`
if [ -n "$dryrun" ]; then
exit 0
fi
set +x
if [ -z "$bug_id" ]; then
echo "Failed to create bug."
exit 1
fi
echo " Created new bug:"
echo https://llvm.org/PR$bug_id
# Add links to revisions
for r in $revisions; do
$BUGZILLA_CMD --ensure-logged-in modify -l "https://reviews.llvm.org/rL$r" $bug_id
done

View File

@ -1,101 +0,0 @@
#!/bin/sh
#===-- merge.sh - Test the LLVM release candidates -------------------------===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License.
#
#===------------------------------------------------------------------------===#
#
# Merge a revision into a project.
#
#===------------------------------------------------------------------------===#
set -e
rev=""
proj=""
revert="no"
srcdir=""
usage() {
echo "usage: `basename $0` [OPTIONS]"
echo " -proj PROJECT The project to merge the result into"
echo " -rev NUM The revision to merge into the project"
echo " -revert Revert rather than merge the commit"
echo " -srcdir The root of the project checkout"
}
while [ $# -gt 0 ]; do
case $1 in
-rev | --rev | -r )
shift
rev=$1
;;
-proj | --proj | -project | --project | -p )
shift
proj=$1
;;
--srcdir | -srcdir | -s)
shift
srcdir=$1
;;
-h | -help | --help )
usage
;;
-revert | --revert )
revert="yes"
;;
* )
echo "unknown option: $1"
echo ""
usage
exit 1
;;
esac
shift
done
if [ -z "$srcdir" ]; then
srcdir="$proj.src"
fi
if [ "x$rev" = "x" -o "x$proj" = "x" ]; then
echo "error: need to specify project and revision"
echo
usage
exit 1
fi
if ! svn ls http://llvm.org/svn/llvm-project/$proj/trunk > /dev/null 2>&1 ; then
echo "error: invalid project: $proj"
exit 1
fi
tempfile=`mktemp /tmp/merge.XXXXXX` || exit 1
if [ $revert = "yes" ]; then
echo "Reverting r$rev:" > $tempfile
else
echo "Merging r$rev:" > $tempfile
fi
svn log -c $rev http://llvm.org/svn/llvm-project/$proj/trunk >> $tempfile 2>&1
cd "$srcdir"
echo "# Updating tree"
svn up
if [ $revert = "yes" ]; then
echo "# Reverting r$rev in $proj locally"
svn merge -c -$rev . || exit 1
else
echo "# Merging r$rev into $proj locally"
svn merge -c $rev https://llvm.org/svn/llvm-project/$proj/trunk . || exit 1
fi
echo
echo "# To commit, run the following in $srcdir/:"
echo svn commit -F $tempfile
exit 0

View File

@ -1,130 +0,0 @@
#!/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
release=""
rc=""
rebranch="no"
projects="llvm cfe test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp libunwind"
dryrun=""
revision="HEAD"
base_url="https://llvm.org/svn/llvm-project"
usage() {
echo "usage: `basename $0` -release <num> [-rebranch] [-revision <num>] [-dry-run]"
echo "usage: `basename $0` -release <num> -rc <num> [-dry-run]"
echo " "
echo " -release <num> The version number of the release"
echo " -rc <num> The release candidate number"
echo " -rebranch Remove existing branch, if present, before branching"
echo " -final Tag final release candidate"
echo " -revision <num> Revision to branch off (default: HEAD)"
echo " -dry-run Make no changes to the repository, just print the commands"
}
tag_version() {
set -x
for proj in $projects; do
if svn ls $base_url/$proj/branches/release_$branch_release > /dev/null 2>&1 ; then
if [ $rebranch = "no" ]; then
continue
fi
${dryrun} svn remove -m "Removing old release_$branch_release branch for rebranching." \
$base_url/$proj/branches/release_$branch_release
fi
${dryrun} svn copy -m "Creating release_$branch_release branch off revision ${revision}" \
-r ${revision} \
$base_url/$proj/trunk \
$base_url/$proj/branches/release_$branch_release
done
set +x
}
tag_release_candidate() {
set -x
for proj in $projects ; do
if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release > /dev/null 2>&1 ; then
${dryrun} svn mkdir -m "Creating release directory for release_$tag_release." $base_url/$proj/tags/RELEASE_$tag_release
fi
if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release/$rc > /dev/null 2>&1 ; then
${dryrun} svn copy -m "Creating release candidate $rc from release_$tag_release branch" \
$base_url/$proj/branches/release_$branch_release \
$base_url/$proj/tags/RELEASE_$tag_release/$rc
fi
done
set +x
}
while [ $# -gt 0 ]; do
case $1 in
-release | --release )
shift
release=$1
;;
-rc | --rc )
shift
rc="rc$1"
;;
-rebranch | --rebranch )
rebranch="yes"
;;
-final | --final )
rc="final"
;;
-revision | --revision )
shift
revision="$1"
;;
-dry-run | --dry-run )
dryrun="echo"
;;
-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"
echo
usage
exit 1
fi
branch_release=`echo $release | sed -e 's,\([0-9]*\.[0-9]*\).*,\1,' | sed -e 's,\.,,g'`
tag_release=`echo $release | sed -e 's,\.,,g'`
if [ "x$rc" = "x" ]; then
tag_version
else
if [ "$revision" != "HEAD" ]; then
echo "error: cannot use -revision with -rc"
echo
usage
exit 1
fi
tag_release_candidate
fi
exit 0

File diff suppressed because it is too large Load Diff