From 6dec29e214e6c9f222a7673efd97d21b3952b090 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Thu, 8 Feb 2018 11:23:37 -0800 Subject: Simplify standard postpublish script and remove them from some private packages --- scripts/postpublish_utils.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'scripts/postpublish_utils.js') diff --git a/scripts/postpublish_utils.js b/scripts/postpublish_utils.js index c4ca917da..9603827db 100644 --- a/scripts/postpublish_utils.js +++ b/scripts/postpublish_utils.js @@ -29,7 +29,7 @@ module.exports = { }; }); }, - publishReleaseNotes: function(tag, releaseName, assets) { + publishReleaseNotesAsync: function(tag, releaseName, assets) { console.log('POSTPUBLISH: Releasing ', releaseName, '...'); return publishReleaseAsync({ token: githubPersonalAccessToken, @@ -49,5 +49,16 @@ module.exports = { const releaseName = subPackageName + ' v' + version; return releaseName; }, + standardPostPublishAsync: function(subPackageName) { + return getLatestTagAndVersionAsync(subPackageName) + .then(function(result) { + const releaseName = getReleaseName(subPackageName, result.version); + const assets = []; + return publishReleaseNotesAsync(result.tag, releaseName, assets); + }) + .catch(function(err) { + throw err; + }); + }, generatedDocsDirectoryName, }; -- cgit v1.2.3 From d7a7e28925257860b4fea9c523eb46c8b98ab511 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Thu, 8 Feb 2018 12:02:04 -0800 Subject: Fix missing references to 'this' --- scripts/postpublish_utils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts/postpublish_utils.js') diff --git a/scripts/postpublish_utils.js b/scripts/postpublish_utils.js index 9603827db..7ce01189c 100644 --- a/scripts/postpublish_utils.js +++ b/scripts/postpublish_utils.js @@ -50,12 +50,12 @@ module.exports = { return releaseName; }, standardPostPublishAsync: function(subPackageName) { - return getLatestTagAndVersionAsync(subPackageName) + return this.getLatestTagAndVersionAsync(subPackageName) .then(function(result) { - const releaseName = getReleaseName(subPackageName, result.version); + const releaseName = this.getReleaseName(subPackageName, result.version); const assets = []; - return publishReleaseNotesAsync(result.tag, releaseName, assets); - }) + return this.publishReleaseNotesAsync(result.tag, releaseName, assets); + }.bind(this)) .catch(function(err) { throw err; }); -- cgit v1.2.3