From: Jakub Jelinek Date: Mon, 13 Apr 2015 08:44:56 +0000 (+0200) Subject: gcc_release: Fix up thinko in the last commit, improve error message. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=49bd12939f7397551000217ac4929fe065549c23;p=gcc.git gcc_release: Fix up thinko in the last commit, improve error message. * gcc_release: Fix up thinko in the last commit, improve error message. Commit all ChangeLog, DEV-PHASE and BASE-VER changes together, rather than doing dozens of separate commits. From-SVN: r222042 --- diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog index 5e152295c52..2f7e2271586 100644 --- a/maintainer-scripts/ChangeLog +++ b/maintainer-scripts/ChangeLog @@ -1,3 +1,9 @@ +2015-04-13 Jakub Jelinek + + * gcc_release: Fix up thinko in the last commit, improve error + message. Commit all ChangeLog, DEV-PHASE and BASE-VER changes + together, rather than doing dozens of separate commits. + 2015-04-12 Jakub Jelinek * gcc_release: For RELEASE_MAJOR 5+ only use the major diff --git a/maintainer-scripts/gcc_release b/maintainer-scripts/gcc_release index 80ddda1e26b..639b2559aec 100755 --- a/maintainer-scripts/gcc_release +++ b/maintainer-scripts/gcc_release @@ -109,45 +109,49 @@ build_sources() { ${SVN} -q co "${SVNROOT}/${SVNBRANCH}" "`basename ${SOURCE_DIRECTORY}`" ||\ error "Could not check out release sources" - for x in `find ${SOURCE_DIRECTORY} -name ChangeLog`; do + svnciargs="" + for x in `changedir ${SOURCE_DIRECTORY} && \ + find . -name ChangeLog`; do # Update this ChangeLog file only if it does not yet contain the # entry we are going to add. (This is a safety net for repeated # runs of this script for the same release.) - if ! grep "GCC ${RELEASE} released." ${x} > /dev/null ; then - cat - ${x} > ${x}.new < /dev/null ; then + cat - ${SOURCE_DIRECTORY}/${x} > ${SOURCE_DIRECTORY}/${x}.new < BASE-VER && \ - ${SVN} -q ci -m 'Bump release' BASE-VER) || \ + echo ${RELEASE} > BASE-VER) || \ error "Could not update BASE-VER" + svnciargs="${svnciargs} gcc/BASE-VER" else - error "Release number ${RELEASE} does not match BASE-VER" + error "Release number ${RELEASE} does not immediately follow BASE-VER" fi fi (changedir ${SOURCE_DIRECTORY}/gcc && \ - : > DEV-PHASE && \ - ${SVN} -q ci -m 'Mark as release' DEV-PHASE) || \ + : > DEV-PHASE) || \ error "Could not update DEV-PHASE" + svnciargs="${svnciargs} gcc/DEV-PHASE" + + (changedir ${SOURCE_DIRECTORY} && \ + ${SVN} -q ci -m 'Update ChangeLog and version files for release' ${svnciargs}) || \ + error "Could not commit ChangeLog and version file updates" # Make sure we tag the sources for a final release. TAG="tags/gcc_`echo ${RELEASE} | tr . _`_release"