Use async/await instead of promise syntax

This commit is contained in:
Fabio Berger 2018-03-13 17:36:12 +01:00
parent a08ae722c1
commit ee29ed26ff

View File

@ -19,7 +19,7 @@ export const postpublishUtils = {
async getLatestTagAndVersionAsync(subPackageName: string): Promise<TagAndVersion> {
const subPackagePrefix = `${subPackageName}@`;
const gitTagsCommand = `git tag -l "${subPackagePrefix}*"`;
return execAsync(gitTagsCommand).then((result: any) => {
const result = await execAsync(gitTagsCommand);
if (!_.isEmpty(result.stderr)) {
throw new Error(result.stderr);
}
@ -34,7 +34,6 @@ export const postpublishUtils = {
tag: latestTag,
version: latestVersion,
};
});
},
async publishReleaseNotesAsync(tag: string, releaseName: string, assets: string[]) {
utils.log('POSTPUBLISH: Releasing ', releaseName, '...');