Skip to content

Commit

Permalink
chore(benchmarks): Add BENCHMARK_ prefix to benchmark env variables (#…
Browse files Browse the repository at this point in the history
…22779)

* Add BENCHMARK_ prefix to benchmark env variables

* Update example envs with BENCHMARK prefix

* Update Contentful envs in setup
  • Loading branch information
duffn authored Apr 3, 2020
1 parent ec4e286 commit 3aa090e
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions benchmarks/source-contentful/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ BENCHMARK_DATASOURCE_LOCAL_PATH='/path/to/benchmark/_dataset
BENCHMARK_SITE_ID='site1'

# Required for `yarn setup` script only
CONTENTFUL_MANAGEMENT_TOKEN=''
BENCHMARK_CONTENTFUL_MANAGEMENT_TOKEN=''

# Required for `yarn build`
CONTENTFUL_SPACE_ID=''
CONTENTFUL_ACCESS_TOKEN=''
BENCHMARK_CONTENTFUL_SPACE_ID=''
BENCHMARK_CONTENTFUL_ACCESS_TOKEN=''
4 changes: 2 additions & 2 deletions benchmarks/source-contentful/bin/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ if (!fs.existsSync(inputDir)) {

const locale = `en-US`
const contentfulConfig = {
spaceId: process.env.CONTENTFUL_SPACE_ID,
managementToken: process.env.CONTENTFUL_MANAGEMENT_TOKEN,
spaceId: process.env.BENCHMARK_CONTENTFUL_SPACE_ID,
managementToken: process.env.BENCHMARK_CONTENTFUL_MANAGEMENT_TOKEN,
}

const { spaceId, managementToken } = contentfulConfig
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/source-contentful/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ require("dotenv").config({
})

const contentfulConfig = {
spaceId: process.env.CONTENTFUL_SPACE_ID,
accessToken: process.env.CONTENTFUL_ACCESS_TOKEN,
host: process.env.CONTENTFUL_HOST,
spaceId: process.env.BENCHMARK_CONTENTFUL_SPACE_ID,
accessToken: process.env.BENCHMARK_CONTENTFUL_ACCESS_TOKEN,
host: process.env.BENCHMARK_CONTENTFUL_HOST,
}

const { spaceId, accessToken } = contentfulConfig
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/source-datocms/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DATOCMS_API_TOKEN=
BENCHMARK_DATOCMS_API_TOKEN=
2 changes: 1 addition & 1 deletion benchmarks/source-datocms/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
{
resolve: `gatsby-source-datocms`,
options: {
apiToken: process.env.DATOCMS_API_TOKEN,
apiToken: process.env.BENCHMARK_DATOCMS_API_TOKEN,
previewMode: false,
disableLiveReload: false,
apiUrl: `https://site-api.datocms.com`,
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/source-drupal/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1 @@
GATSBY_DRUPAL_BASE_URL=
BENCHMARK_DRUPAL_BASE_URL=
2 changes: 1 addition & 1 deletion benchmarks/source-drupal/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
{
resolve: `gatsby-source-drupal`,
options: {
baseUrl: process.env.GATSBY_DRUPAL_BASE_URL,
baseUrl: process.env.BENCHMARK_DRUPAL_BASE_URL,
// Auth needed for POST
},
},
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/source-wordpress/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
{
resolve: `gatsby-source-wordpress-experimental`,
options: {
url: process.env.WPGRAPHQL_URL,
url: process.env.BENCHMARK_WPGRAPHQL_URL,
type: {
Post: {
limit: process.env.NODE_ENV === `development` ? 50 : false,
Expand Down

0 comments on commit 3aa090e

Please sign in to comment.