Use async/await instead of promise syntax
This commit is contained in:
parent
a08ae722c1
commit
ee29ed26ff
@ -19,7 +19,7 @@ export const postpublishUtils = {
|
|||||||
async getLatestTagAndVersionAsync(subPackageName: string): Promise<TagAndVersion> {
|
async getLatestTagAndVersionAsync(subPackageName: string): Promise<TagAndVersion> {
|
||||||
const subPackagePrefix = `${subPackageName}@`;
|
const subPackagePrefix = `${subPackageName}@`;
|
||||||
const gitTagsCommand = `git tag -l "${subPackagePrefix}*"`;
|
const gitTagsCommand = `git tag -l "${subPackagePrefix}*"`;
|
||||||
return execAsync(gitTagsCommand).then((result: any) => {
|
const result = await execAsync(gitTagsCommand);
|
||||||
if (!_.isEmpty(result.stderr)) {
|
if (!_.isEmpty(result.stderr)) {
|
||||||
throw new Error(result.stderr);
|
throw new Error(result.stderr);
|
||||||
}
|
}
|
||||||
@ -34,7 +34,6 @@ export const postpublishUtils = {
|
|||||||
tag: latestTag,
|
tag: latestTag,
|
||||||
version: latestVersion,
|
version: latestVersion,
|
||||||
};
|
};
|
||||||
});
|
|
||||||
},
|
},
|
||||||
async publishReleaseNotesAsync(tag: string, releaseName: string, assets: string[]) {
|
async publishReleaseNotesAsync(tag: string, releaseName: string, assets: string[]) {
|
||||||
utils.log('POSTPUBLISH: Releasing ', releaseName, '...');
|
utils.log('POSTPUBLISH: Releasing ', releaseName, '...');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user