Skip to content

Commit

Permalink
Easily increase version.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmillani committed Nov 9, 2017
1 parent 7f86c05 commit af6e06e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions next-version.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#!/bin/bash

if [[ $# -eq 1 ]]
if [[ $# -eq 0 ]]
then
echo "Please provide version number."
exit 1
Expand All @@ -19,14 +19,17 @@ cat "pictikz.cabal" | sed "s/^version:\( *\)[\"0-9\\.]*/version:\1$VERSION/" > "
cp $TEMP "pictikz.cabal"

# Changelog
echo "# Revision history for pictikz" > "$TEMP"
echo "# Revision history for pictikz
" > "$TEMP"
echo "## $1 -- $TODAY" >> "$TEMP"
tail -n +3 ChangeLog.md >> "$TEMP"
cp "$TEMP" ChangeLog.md

# man page
cd docs
cat man.header | sed 's:\\.TH\([^"]*\)"[^"]*".*\("[^"]*man page"\):.TH\1"'$TODAY'" "'$VERSION'" \2': > "$TEMP"
cat man.header | sed 's:\.TH\([^"]*\)"[^"]*".*\("[^"]*man page"\):.TH\1"'"$TODAY"'" "'"$VERSION"'" \2:' > "$TEMP"
cp "$TEMP" man.header

make
cp pictikz.1 ../
cp README.md ../

0 comments on commit af6e06e

Please sign in to comment.