bump.sh: Fix version formatting
This commit is contained in:
parent
de4fc7642d
commit
31058cd3f4
@ -7,7 +7,7 @@ fi
|
|||||||
|
|
||||||
VERSION=$1
|
VERSION=$1
|
||||||
|
|
||||||
if ! echo $VERSION | grep "^v"; then
|
if echo $VERSION | grep "^[0-9.]"; then
|
||||||
echo "invalid version";
|
echo "invalid version";
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -19,7 +19,7 @@ sed -i 's/(defconst ghc-version ".*")/(defconst ghc-version "'"$VERSION"'")/' \
|
|||||||
|
|
||||||
sed -r -i 's/^(Version:[[:space:]]*)[0-9.]+/\1'"$VERSION"'/' ghc-mod.cabal
|
sed -r -i 's/^(Version:[[:space:]]*)[0-9.]+/\1'"$VERSION"'/' ghc-mod.cabal
|
||||||
|
|
||||||
( tac ChangeLog; echo "\n$(date '+%Y-%m-%d') $VERSION" ) | tac \
|
( tac ChangeLog; echo "\n$(date '+%Y-%m-%d') v$VERSION" ) | tac \
|
||||||
> ChangeLog.tmp
|
> ChangeLog.tmp
|
||||||
|
|
||||||
mv ChangeLog.tmp ChangeLog
|
mv ChangeLog.tmp ChangeLog
|
||||||
@ -28,3 +28,4 @@ emacs -q -nw ChangeLog
|
|||||||
|
|
||||||
git add ChangeLog elisp/ghc.el ghc-mod.cabal
|
git add ChangeLog elisp/ghc.el ghc-mod.cabal
|
||||||
git commit -m "Bump version to $VERSION"
|
git commit -m "Bump version to $VERSION"
|
||||||
|
git tag "v$VERSION"
|
||||||
|
Loading…
Reference in New Issue
Block a user