aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/scripts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-16 05:19:33 +0800
committerFabio Berger <me@fabioberger.com>2017-11-16 05:19:33 +0800
commit827c2457772bd2203307d87f864214c370383807 (patch)
tree18233e949107ccc28fc63442d8cd8fed3b72528d /packages/0x.js/scripts
parent6096fe75d338a82a614d663f7c32ada6c6c7574f (diff)
downloaddexon-0x-contracts-827c2457772bd2203307d87f864214c370383807.tar.gz
dexon-0x-contracts-827c2457772bd2203307d87f864214c370383807.tar.zst
dexon-0x-contracts-827c2457772bd2203307d87f864214c370383807.zip
postpublish script fixes
Diffstat (limited to 'packages/0x.js/scripts')
-rw-r--r--packages/0x.js/scripts/postpublish.js22
1 files changed, 9 insertions, 13 deletions
diff --git a/packages/0x.js/scripts/postpublish.js b/packages/0x.js/scripts/postpublish.js
index ff425adbb..deedee74c 100644
--- a/packages/0x.js/scripts/postpublish.js
+++ b/packages/0x.js/scripts/postpublish.js
@@ -10,12 +10,13 @@ const subPackageName = '0x.js';
const subPackagePrefix = subPackageName + '@';
const githubPersonalAccessToken = process.env.GITHUB_PERSONAL_ACCESS_TOKEN_0X_JS;
let tag;
-
+let version;
getLatestTagAndVersionAsync(subPackageName)
.then(function(result) {
console.log('POSTPUBLISH: Releasing...');
tag = result.tag;
- const releaseName = subPackageName + ' v' + result.version;
+ version = result.version;
+ const releaseName = subPackageName + ' v' + result.version;
return publishReleaseAsync({
token: githubPersonalAccessToken,
owner: '0xProject',
@@ -30,24 +31,19 @@ getLatestTagAndVersionAsync(subPackageName)
assets: ['_bundles/index.js', '_bundles/index.min.js'],
});
})
- .then(function(err, release) {
- if (err !== null) {
- throw err;
- }
- console.log('POSTPUBLISH: Release successful, generating docs...');
- return execAsync('yarn docs:json');
+ .then(function(release) {
+ console.log('POSTPUBLISH: Release successful, generating docs...');
+ return execAsync('yarn docs:json');
})
.then(function(result) {
if (result.stderr !== '') {
throw new Error(result.stderr);
}
- console.log('POSTPUBLISH: Doc generation successful, uploading docs...');
- const s3Url = 's3://0xjs-docs-jsons/v' + tag +'.json';
- return execAsync('S3_URL=' + s3Url + ' yarn upload_docs_json');
+ console.log('POSTPUBLISH: Doc generation successful, uploading docs...');
+ const s3Url = 's3://0xjs-docs-jsons/v' + version +'.json';
+ return execAsync('S3_URL=' + s3Url + ' yarn upload_docs_json');
});
- // "release": "publish-release --assets _bundles/index.js,_bundles/index.min.js --tag $LATEST_TAG --owner 0xProject --repo 0x.js --notes TODO --name $RELEASE_NAME",
-
function getLatestTagAndVersionAsync(subPackageName) {
const subPackagePrefix = subPackageName + '@';
const gitTagsCommand = 'git tags -l "' + subPackagePrefix + '*"';