Skip to content

Commit

Permalink
git branch in deploy
Browse files Browse the repository at this point in the history
Signed-off-by: awjh <andrewhurt@btinternet.com>
  • Loading branch information
awjh committed Jul 13, 2019
1 parent 57ba390 commit c806927
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .travis/after_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ ME=`basename "$0"`

cd $DIR

git checkout master

VERSION=$(npm --no-git-tag-version version patch)

git add --all
Expand Down
8 changes: 5 additions & 3 deletions .travis/before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ ME=`basename "$0"`

cd $DIR

git remote add repo https://${GH_TOKEN}@github.com/awjh/node-red-contrib-alexa-endpoint
git fetch repo

git checkout master

VERSION=$(echo $TRAVIS_TAG | grep -Eo '([0-9]+\.){2}[0-9]+')

jq -r ".version=\"$VERSION\"" "$DIR/package.json" | cat > tmp.json

mv tmp.json $DIR/package.json

git remote add repo https://${GH_TOKEN}@github.com/awjh/node-red-contrib-alexa-endpoint
git fetch repo

if [[ -n $(git status -s) ]]; then
git add --all
git commit -s -m "Release required version bump $VERSION [skip travis]"
Expand Down

0 comments on commit c806927

Please sign in to comment.