gcc/maintainer-scripts/update_version_git
Jakub Jelinek 79ea774f9a Rewrite maintainer-scripts/update_version_git
This patch rewrites update_version_git to be just a thin wrapper around
Martin's new python script.  This just arranges to check out the gcc
repo in a temporary directory, copy out the contrib scripts so that
the running script doesn't change with branch checkouts and runs the script.

I've run it today manually but hopefully we can do it from cron again
from tomorrow.

2020-05-27  Jakub Jelinek  <jakub@redhat.com>

	* update_version_git: Rewrite using
	contrib/gcc-changelog/git_update_version.py.
2020-05-27 10:24:09 +02:00

29 lines
575 B
Bash
Executable File

#!/bin/sh
#
# Update the current version date in DATESTAMP files and generate
# ChangeLog file entries since the last DATESTAMP update from the
# commit messages.
GITROOT=${GITROOT:-"/git/gcc.git"}
# Run this from /tmp.
export GITROOT
BASEDIR=`mktemp -d`
cd "$BASEDIR"
GIT=${GIT:-/usr/local/bin/git}
# Assume all will go well.
SUBDIR=$BASEDIR/gcc
${GIT} clone -q -b master "$GITROOT" "$SUBDIR"
cp -a $SUBDIR/contrib/gcc-changelog $BASEDIR/gcc-changelog
cd "$SUBDIR"
python3 ../gcc-changelog/git_update_version.py -p
RESULT=$?
cd /tmp
/bin/rm -rf $BASEDIR
exit $RESULT