File: tag.sh

package info (click to toggle)
jmock2 2.5.1+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,296 kB
  • sloc: java: 7,436; xml: 541; sh: 122; makefile: 24; ansic: 9
file content (18 lines) | stat: -rwxr-xr-x 435 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

VERSION=${1:?no version number given}
TRUNK=`svn info | grep URL: | cut -c 6-`
REVNO=`svn info | grep Revision: | cut -c 11-`
ROOT=`svn info | grep 'Repository Root:' | cut -c 18-`

CHANGES=`svn status`

if [ ! -z "$CHANGES" ]; then
	echo "Uncommitted changes:"
	svn status
	echo "Will not tag as $VERSION until changes are committed"
	exit 1
fi

svn copy -r $REVNO $TRUNK $ROOT/tags/$VERSION -m "Tagging version $VERSION"