aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/scripts/postpublish.js
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-18 03:19:12 +0800
committerFabio Berger <me@fabioberger.com>2017-11-18 03:19:12 +0800
commit0402d3de802ba262bb820d582baa157ca9c8ba54 (patch)
tree113c39dc3249521ebf7d3924f614ea060bcd022b /packages/0x.js/scripts/postpublish.js
parente70c3976db61bfe2038b0d56ea196412215aae4f (diff)
downloaddexon-sol-tools-0402d3de802ba262bb820d582baa157ca9c8ba54.tar
dexon-sol-tools-0402d3de802ba262bb820d582baa157ca9c8ba54.tar.gz
dexon-sol-tools-0402d3de802ba262bb820d582baa157ca9c8ba54.tar.bz2
dexon-sol-tools-0402d3de802ba262bb820d582baa157ca9c8ba54.tar.lz
dexon-sol-tools-0402d3de802ba262bb820d582baa157ca9c8ba54.tar.xz
dexon-sol-tools-0402d3de802ba262bb820d582baa157ca9c8ba54.tar.zst
dexon-sol-tools-0402d3de802ba262bb820d582baa157ca9c8ba54.zip
Move upload_docs_json back to npm script and pass in vars properly.
Diffstat (limited to 'packages/0x.js/scripts/postpublish.js')
-rw-r--r--packages/0x.js/scripts/postpublish.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/0x.js/scripts/postpublish.js b/packages/0x.js/scripts/postpublish.js
index 1ec0ac258..b9fe0bc9a 100644
--- a/packages/0x.js/scripts/postpublish.js
+++ b/packages/0x.js/scripts/postpublish.js
@@ -4,6 +4,7 @@ const publishRelease = require('publish-release');
const promisify = require('es6-promisify');
const typedoc = require('typedoc');
+const cwd = __dirname + '/..';
const publishReleaseAsync = promisify(publishRelease);
const subPackageName = '0x.js';
const githubPersonalAccessToken = process.env.GITHUB_PERSONAL_ACCESS_TOKEN_0X_JS;
@@ -34,9 +35,9 @@ getLatestTagAndVersionAsync(subPackageName)
console.log('POSTPUBLISH: Release successful, generating docs...');
return execAsync(
- 'yarn docs:json ' + __dirname + '/../docs/index.json ' + __dirname + '/..',
+ 'JSON_FILE_PATH=' + __dirname + '/../docs/index.json PROJECT_DIR=' + __dirname + '/.. yarn docs:json',
{
- cwd: __dirname + '/..',
+ cwd,
}
);
})
@@ -47,7 +48,9 @@ getLatestTagAndVersionAsync(subPackageName)
const fileName = 'v' + version + '.json';
console.log('POSTPUBLISH: Doc generation successful, uploading docs... as ', fileName);
const s3Url = 's3://0xjs-docs-jsons/' + fileName;
- return execAsync('aws s3 cp ' + __dirname + '/../docs/index.json ' + s3Url + ' --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type aplication/json');
+ return execAsync('S3_URL=' + s3Url + ' yarn upload_docs_json', {
+ cwd,
+ });
}).catch (function(err) {
throw err;
});