doipjs/node_modules/license-check-and-add/.travis/before_deploy.sh

26 lines
542 B
Bash
Raw Normal View History

2020-10-23 14:35:53 -06:00
#!/bin/bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
ME=`basename "$0"`
cd $DIR
git remote add repo https://${GH_TOKEN}@github.com/awjh/license-check-and-add
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
if [[ -n $(git status -s) ]]; then
git add --all
git commit -s -m "Release required version bump $VERSION [skip travis]"
git push repo master
fi