2014-09-17 22:04:11 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
echo "Usage: $0 VERSION" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
VERSION=$1
|
|
|
|
|
2014-10-18 17:49:59 +00:00
|
|
|
if ! echo $VERSION | grep "^[0-9.]"; then
|
2014-10-03 19:33:01 +00:00
|
|
|
echo "invalid version";
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-09-17 22:04:11 +00:00
|
|
|
cd $(dirname $0)/..
|
|
|
|
|
|
|
|
sed -i 's/(defconst ghc-version ".*")/(defconst ghc-version "'"$VERSION"'")/' \
|
|
|
|
elisp/ghc.el
|
|
|
|
|
|
|
|
sed -r -i 's/^(Version:[[:space:]]*)[0-9.]+/\1'"$VERSION"'/' ghc-mod.cabal
|
|
|
|
|
2014-10-04 12:03:01 +00:00
|
|
|
( tac ChangeLog; echo "\n$(date '+%Y-%m-%d') v$VERSION" ) | tac \
|
2014-09-17 22:04:11 +00:00
|
|
|
> ChangeLog.tmp
|
|
|
|
|
|
|
|
mv ChangeLog.tmp ChangeLog
|
|
|
|
|
|
|
|
emacs -q -nw ChangeLog
|
|
|
|
|
|
|
|
git add ChangeLog elisp/ghc.el ghc-mod.cabal
|
|
|
|
git commit -m "Bump version to $VERSION"
|
2014-10-04 12:03:01 +00:00
|
|
|
git tag "v$VERSION"
|