basant307/AI_Governance_Project
048
1#!/usr/bin/env bash2 3set -e4 5if [[ -n $TRAVIS_TAG && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then6 echo "About to publish $TRAVIS_TAG to ajv-dist..."7 8 git config user.email "$GIT_USER_EMAIL"9 git config user.name "$GIT_USER_NAME"10 11 git clone https://${GITHUB_TOKEN}@github.com/ajv-validator/ajv-dist.git ../ajv-dist12 13 rm -rf ../ajv-dist/dist14 mkdir ../ajv-dist/dist15 cp ./dist/ajv.* ../ajv-dist/dist16 cat bower.json | sed 's/"name": "ajv"/"name": "ajv-dist"/' > ../ajv-dist/bower.json17 cd ../ajv-dist18 19 if [[ `git status --porcelain` ]]; then20 echo "Changes detected. Updating master branch..."21 git add -A22 git commit -m "updated by travis build #$TRAVIS_BUILD_NUMBER"23 git push --quiet origin master > /dev/null 2>&124 fi25 26 echo "Publishing tag..."27 28 git tag $TRAVIS_TAG29 git push --tags > /dev/null 2>&130 31 echo "Done"32fi33 