Commit a39d2742 by Joseph Myers Committed by Joseph Myers

gcc_release: Further update for SVN.

	* gcc_release: Further update for SVN.  Don't set EXPORTTAG or
	EXPORTDATE; always determine SVNREV the same way.  Correct message
	about what sources are being retrived.  Include branch information
	in LAST_UPDATED.
	* crontab: Don't include initial / in branch name.

From-SVN: r106564
parent e5ef4b3b
2005-11-06 Joseph S. Myers <joseph@codesourcery.com>
* gcc_release: Further update for SVN. Don't set EXPORTTAG or
EXPORTDATE; always determine SVNREV the same way. Correct message
about what sources are being retrived. Include branch information
in LAST_UPDATED.
* crontab: Don't include initial / in branch name.
2005-11-05 Daniel Berlin <dberlin@dberlin.org> 2005-11-05 Daniel Berlin <dberlin@dberlin.org>
* gcc_release: Always determine revision number from date or tag, * gcc_release: Always determine revision number from date or tag,
......
16 0 * * * sh /home/gccadmin/scripts/update_version_svn 16 0 * * * sh /home/gccadmin/scripts/update_version_svn
50 0 * * * sh /home/gccadmin/scripts/update_web_docs_svn 50 0 * * * sh /home/gccadmin/scripts/update_web_docs_svn
55 0 * * * sh /home/gccadmin/scripts/update_web_docs_libstdcxx_svn 55 0 * * * sh /home/gccadmin/scripts/update_web_docs_libstdcxx_svn
32 22 * * 2 sh /home/gccadmin/scripts/gcc_release -s 3.4:/branches/gcc-3_4-branch -l -d /sourceware/snapshot-tmp/gcc all 32 22 * * 2 sh /home/gccadmin/scripts/gcc_release -s 3.4:branches/gcc-3_4-branch -l -d /sourceware/snapshot-tmp/gcc all
32 22 * * 4 sh /home/gccadmin/scripts/gcc_release -s 4.0:/branches/gcc-4_0-branch -l -d /sourceware/snapshot-tmp/gcc all 32 22 * * 4 sh /home/gccadmin/scripts/gcc_release -s 4.0:branches/gcc-4_0-branch -l -d /sourceware/snapshot-tmp/gcc all
43 17 * * 6 sh /home/gccadmin/scripts/gcc_release -s 4.1:/trunk -l -d /sourceware/snapshot-tmp/gcc all 43 17 * * 6 sh /home/gccadmin/scripts/gcc_release -s 4.1:trunk -l -d /sourceware/snapshot-tmp/gcc all
...@@ -65,19 +65,19 @@ inform() { ...@@ -65,19 +65,19 @@ inform() {
usage() { usage() {
cat <<EOF cat <<EOF
gcc_release -r release [-f] [further options] gcc_release -r release [-f] [further options]
gcc_release -s name:cvsbranch [further options] gcc_release -s name:svnbranch [further options]
Options: Options:
-r release Version of the form X.Y or X.Y.Z. -r release Version of the form X.Y or X.Y.Z.
-s name:cvsbranch Create a snapshot, not a real release. -s name:svnbranch Create a snapshot, not a real release.
-d destination Local working directory where we will build the release -d destination Local working directory where we will build the release
(default=${HOME}). (default=${HOME}).
-f Create a final release (and update ChangeLogs,...). -f Create a final release (and update ChangeLogs,...).
-l Indicate that we are running on gcc.gnu.org. -l Indicate that we are running on gcc.gnu.org.
-p previous-tarball Location of a previous tarball (to generate diff files). -p previous-tarball Location of a previous tarball (to generate diff files).
-t tag Tag to mark the release in CVS. -t tag Tag to mark the release in SVN.
-u username Username for upload operations. -u username Username for upload operations.
EOF EOF
exit 1 exit 1
...@@ -166,46 +166,32 @@ EOF ...@@ -166,46 +166,32 @@ EOF
fi fi
# Tag the sources. # Tag the sources.
EXPORTDATE=""
if [ -n "${TAG}" ]; then if [ -n "${TAG}" ]; then
inform "Tagging sources as ${TAG}" inform "Tagging sources as ${TAG}"
EXPORTTAG="${TAG}" # We don't want to overwrite an existing tag. So, if the tag
# Try to check out a file using ${TAG}. If the command succeeds, # already exists, issue an error message; the release manager can
# then the sources have already been tagged. We don't want to # manually remove the tag if appropriate.
# overwrite an existing tag, so we don't want to use the "-F" echo "${SVN} ls ${SVNROOT}/${TAG}/ChangeLog"
# option to "cvs rtag" below. So, if the tag already exists, if ${SVN} ls "${SVNROOT}/${TAG}/ChangeLog"; then
# issue an error message; the release manager can manually remove
# the tag if appropriate.
echo "${SVN} ls ${SVNROOT}/${EXPORTTAG}/ChangeLog"
if ${SVN} ls "${SVNROOT}/${EXPORTTAG}/ChangeLog"; then
error "Tag ${TAG} already exists" error "Tag ${TAG} already exists"
fi fi
${SVN} -m "Tagging source as ${TAG}" cp "${SVNROOT}/${SVNBRANCH}" "${SVNROOT}/${TAG}" || \ ${SVN} -m "Tagging source as ${TAG}" cp "${SVNROOT}/${SVNBRANCH}" "${SVNROOT}/${TAG}" || \
error "Could not tag sources" error "Could not tag sources"
else SVNBRANCH=${TAG}
if [ ${SVNBRANCH} != "/trunk" ]; then
EXPORTTAG="/branches/${SVNBRANCH}"
# It does not work to use both "-r" and "-D" with
# "cvs export" so EXPORTDATE is not set here.
SVNREV=`${SVN} info "${SVNROOT}/${EXPORTTAG}"|grep "Revision:"|awk '{print $2}'`
else
EXPORTTAG=""
EXPORTDATE="-D{`date --iso-8601=minutes`}"
SVNREV=`${SVN} info ${EXPORTDATE} "${SVNROOT}/trunk"|grep "Revision:"|awk '{print $2}'`
fi
fi fi
SVNREV=`${SVN} info "${SVNROOT}/${SVNBRANCH}"|awk '/Revision:/ {print $2}'`
# Export the current sources. # Export the current sources.
inform "Retrieving sources (svn export -r ${SVNREV} ${SVNROOT}/${SVNBRANCH}/gcc)" inform "Retrieving sources (svn export -r ${SVNREV} ${SVNROOT}/${SVNBRANCH})"
${SVN} -q export -r${SVNREV} "${SVNROOT}/${SVNBRANCH}" "`basename ${SOURCE_DIRECTORY}`" ||\ ${SVN} -q export -r${SVNREV} "${SVNROOT}/${SVNBRANCH}" "`basename ${SOURCE_DIRECTORY}`" ||\
error "Could not retrieve sources" error "Could not retrieve sources"
# Run gcc_update on them to set up the timestamps nicely, and (re)write # Run gcc_update on them to set up the timestamps nicely, and (re)write
# the LAST_UPDATED file containing the CVS tag/date used. # the LAST_UPDATED file containing the SVN tag/revision used.
changedir "gcc-${RELEASE}" changedir "gcc-${RELEASE}"
contrib/gcc_update --touch contrib/gcc_update --touch
echo "Obtained from SVN: Revision ${SVNREV}" > LAST_UPDATED echo "Obtained from SVN: ${SVNBRANCH} revision ${SVNREV}" > LAST_UPDATED
# Obtain some documentation files from the wwwdocs module. # Obtain some documentation files from the wwwdocs module.
inform "Retrieving HTML documentation" inform "Retrieving HTML documentation"
...@@ -720,9 +706,6 @@ if [ $SNAPSHOT -eq 0 ]; then ...@@ -720,9 +706,6 @@ if [ $SNAPSHOT -eq 0 ]; then
else else
RELEASE=${BRANCH}-${DATE} RELEASE=${BRANCH}-${DATE}
FTP_PATH="${FTP_PATH}/snapshots/${RELEASE}" FTP_PATH="${FTP_PATH}/snapshots/${RELEASE}"
# if [ ${SVNBRANCH} != "/trunk" ]; then
# TAG=tags/gcc-ss-`echo ${RELEASE} | tr '.' '_'`
# fi
# If diffs are requested when building locally on gcc.gnu.org, we (usually) # If diffs are requested when building locally on gcc.gnu.org, we (usually)
# know what the last snapshot date was and take the corresponding tarballs, # know what the last snapshot date was and take the corresponding tarballs,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment