Auto-infer nightly state from branch

This commit is contained in:
Ines Montani 2020-07-01 14:05:11 +02:00
parent 02334aeafc
commit dc6d9c2fac
3 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,9 @@ const models = require('./meta/languages.json')
const universe = require('./meta/universe.json')
const DEFAULT_TEMPLATE = path.resolve('./src/templates/index.js')
const NIGHTLY_BRANCHES = ['spacy.io-develop']
const isNightly = !!+process.env.SPACY_NIGHTLY || NIGHTLY_BRANCHES.includes(process.env.BRANCH)
module.exports = {
siteMetadata: {
@ -22,6 +25,7 @@ module.exports = {
sidebars,
...models,
universe,
nightly: isNightly,
},
plugins: [

View File

@ -8,7 +8,6 @@
"companyUrl": "https://explosion.ai",
"repo": "explosion/spaCy",
"modelsRepo": "explosion/spacy-models",
"nightly": true,
"social": {
"twitter": "spacy_io",
"github": "explosion"

View File

@ -52,6 +52,7 @@
"scripts": {
"build": "gatsby build",
"dev": "gatsby develop",
"dev:nightly": "BRANCH=spacy.io-develop npm run dev",
"lint": "eslint **",
"clear": "rm -rf .cache",
"test": "echo \"Write tests! -> https://gatsby.app/unit-testing\""