summaryrefslogtreecommitdiff
path: root/maintainer-scripts/update_version_git
blob: 4ebeee5afadcca70f346a16a4006a25932110de9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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