aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/monorepo-scripts/src')
-rw-r--r--packages/monorepo-scripts/src/constants.ts1
-rw-r--r--packages/monorepo-scripts/src/postpublish_utils.ts3
-rw-r--r--packages/monorepo-scripts/src/publish.ts2
3 files changed, 3 insertions, 3 deletions
diff --git a/packages/monorepo-scripts/src/constants.ts b/packages/monorepo-scripts/src/constants.ts
index e93b27820..154a86069 100644
--- a/packages/monorepo-scripts/src/constants.ts
+++ b/packages/monorepo-scripts/src/constants.ts
@@ -4,4 +4,5 @@ export const constants = {
monorepoRootPath: path.join(__dirname, '../../..'),
stagingWebsite: 'http://staging-0xproject.s3-website-us-east-1.amazonaws.com',
lernaExecutable: './node_modules/lerna/bin/lerna.js',
+ githubPersonalAccessToken: process.env.GITHUB_PERSONAL_ACCESS_TOKEN_0X_JS,
};
diff --git a/packages/monorepo-scripts/src/postpublish_utils.ts b/packages/monorepo-scripts/src/postpublish_utils.ts
index ca4c92f5d..df2bcb128 100644
--- a/packages/monorepo-scripts/src/postpublish_utils.ts
+++ b/packages/monorepo-scripts/src/postpublish_utils.ts
@@ -10,7 +10,6 @@ import { constants } from './constants';
import { utils } from './utils';
const publishReleaseAsync = promisify(publishRelease);
-const githubPersonalAccessToken = process.env.GITHUB_PERSONAL_ACCESS_TOKEN_0X_JS;
const generatedDocsDirectoryName = 'generated_docs';
export interface PostpublishConfigs {
@@ -97,7 +96,7 @@ export const postpublishUtils = {
const finalAssets = this.adjustAssetPaths(cwd, assets);
utils.log('POSTPUBLISH: Releasing ', releaseName, '...');
const result = await publishReleaseAsync({
- token: githubPersonalAccessToken,
+ token: constants.githubPersonalAccessToken,
owner: '0xProject',
repo: '0x-monorepo',
tag,
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index 2ae9bbb60..6c728467a 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -123,7 +123,7 @@ async function checkPublishRequiredSetupAsync(): Promise<boolean> {
}
// Check to see if Git personal token setup
- if (_.isUndefined(process.env.GITHUB_PERSONAL_ACCESS_TOKEN_0X_JS)) {
+ if (_.isUndefined(constants.githubPersonalAccessToken)) {
utils.log(
'You must have a Github personal access token set to an envVar named `GITHUB_PERSONAL_ACCESS_TOKEN_0X_JS`. Add it then try again.',
);