From f9b2c6b887b2b2495a210809a169638d8e7f045a Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Tue, 21 Jul 2015 19:06:07 +0100 Subject: [PATCH] Split release script into tw parts: distcheck and everything else. --- add-release.txt | 25 ++++++++++++------------ re2c/distcheck.sh | 25 ++++++++++++++++++++++++ re2c/release.sh | 50 ----------------------------------------------- release.sh | 48 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 63 deletions(-) create mode 100755 re2c/distcheck.sh delete mode 100755 re2c/release.sh create mode 100755 release.sh diff --git a/add-release.txt b/add-release.txt index bcfc9579..ceedd7be 100644 --- a/add-release.txt +++ b/add-release.txt @@ -1,16 +1,15 @@ -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 -4. Run script release.sh: - ./release.sh - -5. Write NEWS file - -6. Add release notes on freshmeat - -7. Don't forget to set version to .dev +4. Update version to .dev diff --git a/re2c/distcheck.sh b/re2c/distcheck.sh new file mode 100755 index 00000000..efff7d4f --- /dev/null +++ b/re2c/distcheck.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e + +if [ $# -ne 1 ] +then + echo "usage: ./distcheck.sh " + 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 diff --git a/re2c/release.sh b/re2c/release.sh deleted file mode 100755 index 6317cc04..00000000 --- a/re2c/release.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -set -e - -if [ $# -ne 1 ] -then - echo "usage: ./release.sh " - 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 diff --git a/release.sh b/release.sh new file mode 100755 index 00000000..9eeb6a94 --- /dev/null +++ b/release.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +set -e + +if [ $# -ne 1 ] +then + echo "usage: ./release.sh " + 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 -- 2.40.0