]> granicus.if.org Git - re2c/commitdiff
Split release script into tw parts: distcheck and everything else.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 21 Jul 2015 18:06:07 +0000 (19:06 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 21 Jul 2015 18:06:07 +0000 (19:06 +0100)
add-release.txt
re2c/distcheck.sh [new file with mode: 0755]
re2c/release.sh [deleted file]
release.sh [new file with mode: 0755]

index bcfc9579869d2843bd8829544d020a81cecc13de..ceedd7be24b98eca2e97e2b3cff53061b710e8c3 100644 (file)
@@ -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 <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
diff --git a/re2c/distcheck.sh b/re2c/distcheck.sh
new file mode 100755 (executable)
index 0000000..efff7d4
--- /dev/null
@@ -0,0 +1,25 @@
+#!/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
diff --git a/re2c/release.sh b/re2c/release.sh
deleted file mode 100755 (executable)
index 6317cc0..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/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
diff --git a/release.sh b/release.sh
new file mode 100755 (executable)
index 0000000..9eeb6a9
--- /dev/null
@@ -0,0 +1,48 @@
+#!/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