-1. Upload new and delete old documentation
+1. Test windows build using mingw:
+ $ re2c/autogen.sh
+ $ re2c/build_mingw.sh
+ $ cd re2c/.build_mingw
+ $ make wtests
+ $ cd ../..
-2. Test windows build using cygwin
+2. Edit the following files:
+ CHANGELOG
+ on branch 'gh-pages': index.html
-3. Edit the following files:
- - CHANGELOG
- - htdocs/index.html
+3. Run release script:
+ $ re2c/release.sh <version>
-4. Run script release.sh:
- ./release.sh <version>
-
-5. Write NEWS file
-
-6. Add release notes on freshmeat
-
-7. Don't forget to set version to .dev
+4. Update version to .dev
--- /dev/null
+#!/bin/bash
+
+set -e
+
+if [ $# -ne 1 ]
+then
+ echo "usage: ./distcheck.sh <builddir>"
+ exit 1
+fi
+builddir=$1
+srcdir=`pwd`
+
+$srcdir/autogen.sh
+
+# try to be portable on various MAKEs
+for make_prog in make bmake
+do
+ rm -rf $builddir
+ mkdir $builddir
+ cd $builddir
+ $srcdir/configure --enable-docs && \
+ $make_prog bootstrap -j5
+ $make_prog distcheck -j5
+ cd $srcdir
+done
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-if [ $# -ne 1 ]
-then
- echo "usage: ./release.sh <version>"
- exit
-fi
-
-version="$1"
-
-# edit version in configure.in
-lcontext="AC_INIT\(\[re2c\],\["
-rcontext="\],\[re2c-general@lists\.sourceforge\.net\]\)"
-old="[0-9]+(\.[0-9]+)*(\.dev)?"
-new=$version
-sed -i -E "s/$lcontext$old$rcontext/$lcontext$new$rcontext/" configure.ac
-
-./autogen.sh
-builddir=.build
-
-# try to be portable on various MAKEs
-for make_prog in make bmake
-do
- rm -rf $builddir
- mkdir $builddir
- cd $builddir
- ../configure --enable-docs && \
- $make_prog bootstrap -j5
- $make_prog distcheck -j5
- cd .. # $builddir
-done
-
-# upload files on sourceforge
-cd $builddir
- src=release
- src_tarballs=$src/frs/project/re2c/re2c/$version
- src_docs=$src/project-web/re2c/htdocs
- mkdir -p $src_tarballs $src_docs
- cp re2c-$version.tar.gz $src_tarballs
- cp ../doc/index.html doc/manual.html $src_docs
- rsync -rK $src/ skvadrik@web.sourceforge.net:/home
-cd .. # $builddir
-
-# commit release
-git commit -a -m "Release $version."
-git tag $version
-git push --follow-tags
-git push --follow-tags github master
--- /dev/null
+#!/bin/bash
+
+set -e
+
+if [ $# -ne 1 ]
+then
+ echo "usage: ./release.sh <version>"
+ exit 1
+fi
+
+branch=`git rev-parse --abbrev-ref HEAD`
+if [ $branch != "master" ]
+then
+ echo "must be on branch 'master'"
+ exit 1
+fi
+
+version="$1"
+
+# edit version in re2c/configure.in
+lcontext="AC_INIT\(\[re2c\],\["
+rcontext="\],\[re2c-general@lists\.sourceforge\.net\]\)"
+old="[0-9]+(\.[0-9]+)*(\.dev)?"
+new=$version
+sed -i -E "s/$lcontext$old$rcontext/$lcontext$new$rcontext/" re2c/configure.ac
+
+# distcheck
+builddir=.build
+cd re2c && ./distcheck $builddir && cd ..
+
+# commit release
+git commit -a -m "Release $version."
+git tag $version
+for r in `git remote`
+do
+ git push --follow-tags $r master
+done
+
+# upload site
+git checkout gh-pages
+ cp -f re2c/$builddir/doc/manual.html manual.html
+ git add index.html manual.html
+ git commit -a -m "Updated site."
+ for r in `git remote`
+ do
+ git push $r gh-pages
+ done
+git checkout master