File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ VERSION=$1
3+ [ -z " $VERSION " ] && exit 1
4+ OS=` uname`
5+ SED_ARG=' -r'
6+
7+ if [ $OS == " Darwin" ]
8+ then
9+ SED_ARG=' -E'
10+ fi
11+
12+ sed $SED_ARG " s/version = (.*)/version = \" $VERSION -1\" /;s/tag = (.*)/tag = \" v$VERSION \" /" rockspecs/elasticsearch.rockspec > rockspecs/elasticsearch-$VERSION -1.rockspec
13+ sed $SED_ARG " s/luarocks make (.*)/luarocks make rockspecs\/elasticsearch-$VERSION -1.rockspec/" .travis.yml > .travis.yml.tmp
14+ sed $SED_ARG " s/luarocks make (.*)/luarocks make rockspecs\/elasticsearch-$VERSION -1.rockspec/" tests/stress/.travis.yml > tests/stress/.travis.yml.tmp
15+
16+ if [ $? == 0 ]
17+ then
18+ mv .travis.yml.tmp .travis.yml
19+ mv tests/stress/.travis.yml.tmp tests/stress/.travis.yml
20+ git add rockspecs/elasticsearch-$VERSION -1.rockspec
21+ read -r -p " Do you want to tag this release in git? [y/N] " response
22+ if [[ $response =~ ^([yY])$ ]]
23+ then
24+ SIGN=" "
25+ read -r -p " Do you want to sign the tag? [y/N] " response
26+ if [[ $response =~ ^([yY])$ ]]
27+ then
28+ SIGN=" --sign"
29+ fi
30+ git add -u
31+ git commit -m " Set version $VERSION and tagged as v$VERSION "
32+ git tag -a v$VERSION -m " v$VERSION " $SIGN
33+ echo " Tagged this commit as v$VERSION "
34+ fi
35+ fi
You can’t perform that action at this time.
0 commit comments