#!/bin/bash

#Usage ./bump major.minor.patch

V="$1-$(date +%Y%m%d)"
sed -e "s/AC_INIT(\([^ ,]*, *\[\)[0-9._\-]*/AC_INIT(\1$V/g" configure.ac >configure.ac+ && mv configure.ac+ configure.ac
make doc
dvcs ci -m "Bump version number"
dvcs tag add $V
git remote | xargs -L 1 -P 4 git push --follow-tags --all
