Added before install to travis for stopping build if only docs changed

This commit is contained in:
Syrus Akbary 2015-11-25 21:00:13 -08:00
parent e55d230faf
commit 2574ee2976
4 changed files with 20 additions and 12 deletions

View File

@ -12,7 +12,14 @@ cache:
- $HOME/.cache/pip
- docs/node_modules/
- $HOME/docs/node_modules
- $(npm config get prefix)/bin/gatsby
before_install:
- |
if [ "$TEST_TYPE" != build_website ] && \
! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs))/'
then
echo "Only docs were updated, stopping build process."
exit
fi
install:
- |
if [ "$TEST_TYPE" = build ]; then
@ -25,6 +32,7 @@ install:
script:
- |
if [ "$TEST_TYPE" = build_website ]; then
if [ "$TRAVIS_BRANCH" = "docs" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then
echo "Building the web."
nvm install 4.0
@ -44,6 +52,7 @@ script:
git push "https://${GITHUB_TOKEN}@github.com/graphql-python/graphene.git" gh-pages-seg
fi
exit
fi
elif [ "$TEST_TYPE" = lint ]; then
echo "Checking Python code lint."
flake8

View File

@ -5,7 +5,7 @@
"main": "n/a",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "npm install -g gatsby && npm install && gatsby build",
"build": "npm install && ./node_modules/.bin/gatsby build",
"deploy": "npm run build"
},
"keywords": [
@ -15,6 +15,7 @@
"dependencies": {
"copy-webpack-plugin": "^0.2.0",
"extract-text-webpack-plugin": "^0.9.1",
"gatsby": "^0.7.2",
"jeet": "^6.1.2",
"lodash": "^3.10.1",
"nib": "^1.1.0",

View File

@ -6,7 +6,6 @@ if (IN_BROWSER) {
navigator.userAgent && !navigator.userAgent.match('CriOS');
var browser_supported = !isSafari;
}
console.log(browser_supported);
if (IN_BROWSER && browser_supported) {
var glfx = require('../vendor/glfx.optim')
var particlesJS = require('../vendor/particles.js')

View File

@ -1,7 +1,6 @@
// React patched version for render in server side always with same ids
if (typeof window === "undefined") {
var ServerReactRootIndex = require('react/lib/ServerReactRootIndex');
console.log(ServerReactRootIndex);
ServerReactRootIndex.createReactRootIndex = function(){
return "graphene";
};