mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 12:44:15 +03:00
Added before install to travis for stopping build if only docs changed
This commit is contained in:
parent
e55d230faf
commit
2574ee2976
11
.travis.yml
11
.travis.yml
|
@ -12,7 +12,14 @@ cache:
|
||||||
- $HOME/.cache/pip
|
- $HOME/.cache/pip
|
||||||
- docs/node_modules/
|
- docs/node_modules/
|
||||||
- $HOME/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:
|
install:
|
||||||
- |
|
- |
|
||||||
if [ "$TEST_TYPE" = build ]; then
|
if [ "$TEST_TYPE" = build ]; then
|
||||||
|
@ -25,6 +32,7 @@ install:
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
if [ "$TEST_TYPE" = build_website ]; then
|
if [ "$TEST_TYPE" = build_website ]; then
|
||||||
|
if [ "$TRAVIS_BRANCH" = "docs" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then
|
||||||
echo "Building the web."
|
echo "Building the web."
|
||||||
nvm install 4.0
|
nvm install 4.0
|
||||||
|
|
||||||
|
@ -44,6 +52,7 @@ script:
|
||||||
git push "https://${GITHUB_TOKEN}@github.com/graphql-python/graphene.git" gh-pages-seg
|
git push "https://${GITHUB_TOKEN}@github.com/graphql-python/graphene.git" gh-pages-seg
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
|
fi
|
||||||
elif [ "$TEST_TYPE" = lint ]; then
|
elif [ "$TEST_TYPE" = lint ]; then
|
||||||
echo "Checking Python code lint."
|
echo "Checking Python code lint."
|
||||||
flake8
|
flake8
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"main": "n/a",
|
"main": "n/a",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"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"
|
"deploy": "npm run build"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -15,6 +15,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"copy-webpack-plugin": "^0.2.0",
|
"copy-webpack-plugin": "^0.2.0",
|
||||||
"extract-text-webpack-plugin": "^0.9.1",
|
"extract-text-webpack-plugin": "^0.9.1",
|
||||||
|
"gatsby": "^0.7.2",
|
||||||
"jeet": "^6.1.2",
|
"jeet": "^6.1.2",
|
||||||
"lodash": "^3.10.1",
|
"lodash": "^3.10.1",
|
||||||
"nib": "^1.1.0",
|
"nib": "^1.1.0",
|
||||||
|
|
|
@ -6,7 +6,6 @@ if (IN_BROWSER) {
|
||||||
navigator.userAgent && !navigator.userAgent.match('CriOS');
|
navigator.userAgent && !navigator.userAgent.match('CriOS');
|
||||||
var browser_supported = !isSafari;
|
var browser_supported = !isSafari;
|
||||||
}
|
}
|
||||||
console.log(browser_supported);
|
|
||||||
if (IN_BROWSER && browser_supported) {
|
if (IN_BROWSER && browser_supported) {
|
||||||
var glfx = require('../vendor/glfx.optim')
|
var glfx = require('../vendor/glfx.optim')
|
||||||
var particlesJS = require('../vendor/particles.js')
|
var particlesJS = require('../vendor/particles.js')
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
// React patched version for render in server side always with same ids
|
// React patched version for render in server side always with same ids
|
||||||
if (typeof window === "undefined") {
|
if (typeof window === "undefined") {
|
||||||
var ServerReactRootIndex = require('react/lib/ServerReactRootIndex');
|
var ServerReactRootIndex = require('react/lib/ServerReactRootIndex');
|
||||||
console.log(ServerReactRootIndex);
|
|
||||||
ServerReactRootIndex.createReactRootIndex = function(){
|
ServerReactRootIndex.createReactRootIndex = function(){
|
||||||
return "graphene";
|
return "graphene";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user