twitst4tz

twitter statistics web application
Log | Files | Refs | README | LICENSE

publish-built-version (840B)


      1 #!/usr/bin/env bash
      2 
      3 set -e
      4 
      5 if [[ -n $TRAVIS_TAG && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then
      6   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/epoberezkin/ajv-dist.git ../ajv-dist
     12 
     13   rm -rf ../ajv-dist/dist
     14   mkdir ../ajv-dist/dist
     15   cp ./dist/ajv.* ../ajv-dist/dist
     16   cat bower.json | sed 's/"name": "ajv"/"name": "ajv-dist"/' > ../ajv-dist/bower.json
     17   cd ../ajv-dist
     18 
     19   if [[ `git status --porcelain` ]]; then
     20     echo "Changes detected. Updating master branch..."
     21     git add -A
     22     git commit -m "updated by travis build #$TRAVIS_BUILD_NUMBER"
     23     git push --quiet origin master > /dev/null 2>&1
     24   fi
     25 
     26   echo "Publishing tag..."
     27 
     28   git tag $TRAVIS_TAG
     29   git push --tags > /dev/null 2>&1
     30 
     31   echo "Done"
     32 fi