|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# Copyright 2014 Google Inc. All rights reserved. |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | + |
| 17 | +set -ev |
| 18 | + |
| 19 | +# decrypt credentials |
| 20 | +openssl aes-256-cbc -K $encrypted_b8aa0887832a_key -iv $encrypted_b8aa0887832a_iv -in key.json.enc -out key.json -d |
| 21 | + |
| 22 | +# create new coverage report |
| 23 | +npm run coveralls |
| 24 | + |
| 25 | +### Update docs |
| 26 | +# generate new set of json files in docs/json/master |
| 27 | +npm run docs |
| 28 | +git submodule add -f -b gh-pages https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} ghpages |
| 29 | +# copy set of json to tag folder |
| 30 | +mkdir ghpages/json/${TRAVIS_TAG} |
| 31 | +cp -R docs/json/master/* ghpages/json/${TRAVIS_TAG} |
| 32 | +cd ghpages |
| 33 | +git add json/${TRAVIS_TAG} |
| 34 | +# add new tag to versions |
| 35 | +echo "${TRAVIS_TAG}" >> versions.txt |
| 36 | +git add versions.txt |
| 37 | +# commit to gh-pages branch |
| 38 | +git config user.name "selfiebot" |
| 39 | +git commit -m "Update docs for ${TRAVIS_TAG}" |
| 40 | +git push https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} HEAD:gh-pages |
0 commit comments