~ubuntu-branches/ubuntu/trusty/cl-asdf/trusty

« back to all changes in this revision

Viewing changes to bin/bump-version

  • Committer: Package Import Robot
  • Author(s): Francois-Rene Rideau
  • Date: 2013-05-27 22:44:50 UTC
  • mfrom: (1.1.28)
  • Revision ID: package-import@ubuntu.com-20130527224450-4bddztgqi7q1uzn7
Tags: 2:3.0.1.2-1
ASDF 3.0.1.2 fixes issues with the debian package itself.
It also includes fixes to run-program and run-shell-command.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
# Takes one optional argument: the new version number.
3
 
# If not provided, increment previous patch number,
4
 
# e.g. 3.45.6 ==> 3.45.7, or 3.56 ==> 3.56.1
5
 
NEWVER="${1}"
6
 
PROG="$0"
7
 
ASDFDIR="$(cd $(dirname $PROG)/.. ; /bin/pwd)" ## readlink -f doesn't work on BSD
8
 
ASDFLISP=${ASDFDIR}/asdf.lisp
9
 
ASDFASD=${ASDFDIR}/asdf.asd
10
 
 
11
 
if [ -z "$NEWVER" ] ; then
12
 
  OLDVER="$(grep '         (asdf-version "' $ASDFLISP | cut -d\" -f2)"
13
 
  NEWVER="$(echo $OLDVER | perl -npe 's/([0-9].[0-9]+)(\.([0-9]+))?/"${1}.".($3+1)/e')"
14
 
fi
15
 
echo "Setting ASDF version to $NEWVER"
16
 
perl -i.bak -npe 's/^(         \(asdf-version "|;;; This is ASDF )[0-9.]+("\)|:)/${1}'"$NEWVER"'${2}/' $ASDFLISP
17
 
perl -i.bak -npe 's/^(  :version ")[0-9.]+(")/${1}'"$NEWVER"'${2}/' $ASDFASD
18
 
cat<<EOF
19
 
To complete the version change, you may:
20
 
        git add -u
21
 
        git commit
22
 
        git tag $NEWVER
23
 
EOF