Add postpublish scripts
This commit is contained in:
@@ -8,26 +8,21 @@ const S3BucketPath = 's3://0xjs-docs-jsons/';
|
||||
|
||||
let tag;
|
||||
let version;
|
||||
postpublish_utils.getLatestTagAndVersionAsync(subPackageName)
|
||||
postpublish_utils
|
||||
.getLatestTagAndVersionAsync(subPackageName)
|
||||
.then(function(result) {
|
||||
tag = result.tag;
|
||||
version = result.version;
|
||||
const releaseName = postpublish_utils.getReleaseName(subPackageName, version);
|
||||
const assets = [
|
||||
__dirname + '/../_bundles/index.js',
|
||||
__dirname + '/../_bundles/index.min.js',
|
||||
];
|
||||
return postpublish_utils.publishReleaseNotes(tag, releaseName, assets);
|
||||
const releaseName = postpublish_utils.getReleaseName(subPackageName, version);
|
||||
const assets = [__dirname + '/../_bundles/index.js', __dirname + '/../_bundles/index.min.js'];
|
||||
return postpublish_utils.publishReleaseNotes(tag, releaseName, assets);
|
||||
})
|
||||
.then(function(release) {
|
||||
console.log('POSTPUBLISH: Release successful, generating docs...');
|
||||
const jsonFilePath = __dirname + '/../' + postpublish_utils.generatedDocsDirectoryName + '/index.json';
|
||||
return execAsync(
|
||||
'JSON_FILE_PATH=' + jsonFilePath + ' PROJECT_DIR=' + __dirname + '/.. yarn docs:json',
|
||||
{
|
||||
cwd,
|
||||
}
|
||||
);
|
||||
return execAsync('JSON_FILE_PATH=' + jsonFilePath + ' PROJECT_DIR=' + __dirname + '/.. yarn docs:json', {
|
||||
cwd,
|
||||
});
|
||||
})
|
||||
.then(function(result) {
|
||||
if (result.stderr !== '') {
|
||||
@@ -39,6 +34,7 @@ postpublish_utils.getLatestTagAndVersionAsync(subPackageName)
|
||||
return execAsync('S3_URL=' + s3Url + ' yarn upload_docs_json', {
|
||||
cwd,
|
||||
});
|
||||
}).catch (function(err) {
|
||||
})
|
||||
.catch(function(err) {
|
||||
throw err;
|
||||
});
|
||||
|
Reference in New Issue
Block a user