-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtag-release
More file actions
executable file
·34 lines (29 loc) · 841 Bytes
/
tag-release
File metadata and controls
executable file
·34 lines (29 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
if [ -z $1 ]; then
echo "Please specify a version"
exit
fi
FULLVERSION=$1
VERSION=${FULLVERSION/-*/}
echo "Full version: $FULLVERSION"
echo "Version: $VERSION"
sed -i -e "/^\$version =/ c \$version = '$FULLVERSION'" launch_here.rb
sed -i -e "/^\$version ||=/ c \$version ||= '$FULLVERSION'" bin/rbot
sed -i -e "/^ s.version =/ c \ s.version = '$VERSION'" Rakefile
NOGIT=${FULLVERSION/-git/}
if [ $NOGIT == $FULLVERSION ]; then
# Not a git version
git commit -m "Version $FULLVERSION" -a
git tag -a -m "rbot $FULLVERSION" rbot-$FULLVERSION
rake package
if [ $VERSION != $FULLVERSION ]; then
pushd pkg
mv rbot-$VERSION.gem rbot-$FULLVERSION.gem
mv rbot-$VERSION.tgz rbot-$FULLVERSION.tgz
mv rbot-$VERSION.zip rbot-$FULLVERSION.zip
popd
fi
else
# git version
git commit -m "Start working on $NOGIT" -a
fi