From 130319842ef78b44f66efd68c7d227b516672bb1 Mon Sep 17 00:00:00 2001 From: fujiangtao Date: Sat, 20 Apr 2019 19:26:56 +0800 Subject: [PATCH] Fixed #187 --- src/publish.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/publish.ts b/src/publish.ts index 82aaaf8d..8e09f70f 100644 --- a/src/publish.ts +++ b/src/publish.ts @@ -145,8 +145,7 @@ export function publish(options: IPublishOptions = {}): Promise { const baseImagesUrl = options.baseImagesUrl; const useYarn = options.useYarn; - promise = versionBump(options.cwd, options.version) - .then(() => tmpName()) + promise = tmpName() .then(packagePath => pack({ packagePath, cwd, baseContentUrl, baseImagesUrl, useYarn })); } @@ -159,7 +158,8 @@ export function publish(options: IPublishOptions = {}): Promise { ? Promise.resolve(options.pat) : getPublisher(manifest.publisher).then(p => p.pat); - return patPromise.then(pat => _publish(packagePath, pat, manifest)); + return versionBump(options.cwd, options.version) + .then(() => patPromise.then(pat => _publish(packagePath, pat, manifest))) }); }