3 if [ "x`git status -s -uno`" != "x" ]; then
4 echo 'Uncommited changes in repository' 1>&2
13 echo 'Invalid version number:' "$version" 1>&2
19 awk -F. '{ printf ("major=%d\nminor=%d\nrevision=%d\n",
22 # Update the version numbers
24 sed -i configure.in -e "/^AM_INIT_AUTOMAKE/s/2\.[0-9.]*/$version/"
26 sed -i fontconfig/fontconfig.h \
27 -e "/^#define FC_MAJOR/s/[0-9][0-9]*/$major/" \
28 -e "/^#define FC_MINOR/s/[0-9][0-9]*/$minor/" \
29 -e "/^#define FC_REVISION/s/[0-9][0-9]*/$revision/"
32 # Compute pretty form of new version number
34 version_note=`echo $version | awk -F. '{
36 printf ("%d.%d.%d (%d.%d RC%d)\n",
37 $1, $2, $3, $1, $2 + 1, $3 - 90);
39 printf ("%d.%d\n", $1, $2);
41 printf ("%d.%d.%d\n", $1, $2, $3); }'`
44 # Find previous version in README
46 last_note=`grep '^2\.[0-9.]*' README |
48 sed 's/ (2\.[0-9]* RC[0-9]*)//'`
57 echo 'cannot find previous changelog' 1>&2
62 # Format the current date for the README header
64 date=`date '+%Y-%m-%d'`
67 # Update the readme file
69 if [ $version != $last ]; then
73 (sed '/^2\.[0-9.]*/,$d' README |
74 sed -e "s/Version.*/Version $version_note/" \
75 -e "s/200.*/$date/" | awk '
79 space=(70 - length) / 2;
80 for (i = 0; i < space; i++)
95 git log --pretty=short $last.. | git shortlog | cat
101 sed -n '/^2\.[0-9.]*/,$p' README) > README.tmp ||
102 (echo "README update failed"; exit 1)
107 $test git commit -m"Bump version to $version" \
109 fontconfig/fontconfig.h \
113 $test git tag -s -m "Version $version" $version
115 # Make distributed change log
117 git log --stat $last.. > ChangeLog-$version