Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: refactoring doc scripts #1743

Merged
merged 11 commits into from
Oct 27, 2016
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ packages/*/CONTRIBUTORS
packages/*/COPYING
**/node_modules
**/coverage/*
docs/json/**/*.json
docs/json
*.log
21 changes: 19 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,24 @@ before_script:
fi
script: "node ./scripts/build.js"
after_success:
- if [ $IS_PUSH_TO_MASTER ]; then
node ./scripts/build-docs.js;
- if [ $IS_PUSH_TO_MASTER && "${TRAVIS_JOB_NUMBER}" == *1 ]; then

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

rm -rf docs/json;
npm run docs;
git submodule add -b gh-pages https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} ghpages;
cp -rf docs/json/* ghpages/json;
cp docs/manifest.json ghpages;
cd ghpages;
set +e;
git add .;
set -e;
if [[ -z "$(git status --porcelain)" ]]; then
echo "Nothing to commit. Exiting without pushing changes.";
exit 0;
fi;
git config user.name "travis-ci";
git config user.email "travis@travis-ci.org";
git commit -m "Update docs for ${TRAVIS_TAG:-master} [ci skip]";
git status;
git push https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} HEAD:gh-pages;
fi
sudo: false
Empty file removed docs/json/bigquery/master/.gitkeep
Empty file.
Empty file removed docs/json/bigtable/master/.gitkeep
Empty file.
Empty file removed docs/json/compute/master/.gitkeep
Empty file.
Empty file.
Empty file removed docs/json/dns/master/.gitkeep
Empty file.
Empty file.
Empty file removed docs/json/language/master/.gitkeep
Empty file.
Empty file removed docs/json/logging/master/.gitkeep
Empty file.
Empty file.
Empty file.
Empty file removed docs/json/pubsub/master/.gitkeep
Empty file.
Empty file removed docs/json/resource/master/.gitkeep
Empty file.
Empty file removed docs/json/speech/master/.gitkeep
Empty file.
Empty file removed docs/json/storage/master/.gitkeep
Empty file.
Empty file.
Empty file removed docs/json/vision/master/.gitkeep
Empty file.
18 changes: 17 additions & 1 deletion docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"name": "google-cloud",
"defaultService": "google-cloud",
"versions": [
"0.43.0",
"0.42.2",
"0.41.2",
"0.41.0",
Expand Down Expand Up @@ -132,6 +133,7 @@
"name": "@google-cloud/language",
"defaultService": "language",
"versions": [
"0.5.0",
"0.4.0",
"0.3.0",
"0.2.0",
Expand All @@ -145,13 +147,23 @@
"name": "@google-cloud/logging",
"defaultService": "logging",
"versions": [
"0.5.0",
"0.4.0",
"0.3.0",
"0.2.0",
"0.1.1",
"master"
]
},
{
"id": "monitoring",
"name": "@google-cloud/monitoring",
"defaultService": "monitoring",
"versions": [
"0.1.1",
"master"
]
},
{
"id": "prediction",
"name": "@google-cloud/prediction",
Expand All @@ -169,6 +181,7 @@
"name": "@google-cloud/pubsub",
"defaultService": "pubsub",
"versions": [
"0.5.0",
"0.4.0",
"0.3.0",
"0.2.0",
Expand All @@ -192,6 +205,7 @@
"name": "@google-cloud/speech",
"defaultService": "speech",
"versions": [
"0.4.0",
"0.3.0",
"0.2.0",
"master"
Expand All @@ -202,6 +216,7 @@
"name": "@google-cloud/storage",
"defaultService": "storage",
"versions": [
"0.4.0",
"0.3.0",
"0.2.0",
"0.1.1",
Expand All @@ -225,6 +240,7 @@
"name": "@google-cloud/vision",
"defaultService": "vision",
"versions": [
"0.5.0",
"0.4.0",
"0.3.0",
"0.2.0",
Expand All @@ -237,4 +253,4 @@
"title": "npm",
"href": "https://www.npmjs.com/package/gcloud"
}
}
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"postinstall": "node ./scripts/install.js",
"link-common": "node ./scripts/link-common.js",
"update-deps": "node ./scripts/update-deps.js",
"docs": "node ./scripts/docs/packages.js",
"bundle": "node ./scripts/docs/bundle.js",
"docs": "node ./scripts/docs",
"lint": "jshint scripts/ packages/ system-test/ test/ && jscs packages/ system-test/ test/",
"test": "npm run docs && npm run snippet-test && npm run unit-test",
"unit-test": "mocha --timeout 5000 --bail packages/*/test/*.js",
Expand Down
154 changes: 0 additions & 154 deletions scripts/build-docs.js

This file was deleted.

Loading