diff options
author | Fabio Berger <me@fabioberger.com> | 2018-07-26 20:42:07 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-07-26 20:42:07 +0800 |
commit | 55dbb0ece06d17a9db7b93a0ffa274ff65298002 (patch) | |
tree | 6089bddc51b548e768d04e4732feca106302ec57 | |
parent | af4071e119b4cb651ae311ea1200fdd76f8123e7 (diff) | |
download | dexon-0x-contracts-55dbb0ece06d17a9db7b93a0ffa274ff65298002.tar dexon-0x-contracts-55dbb0ece06d17a9db7b93a0ffa274ff65298002.tar.gz dexon-0x-contracts-55dbb0ece06d17a9db7b93a0ffa274ff65298002.tar.bz2 dexon-0x-contracts-55dbb0ece06d17a9db7b93a0ffa274ff65298002.tar.lz dexon-0x-contracts-55dbb0ece06d17a9db7b93a0ffa274ff65298002.tar.xz dexon-0x-contracts-55dbb0ece06d17a9db7b93a0ffa274ff65298002.tar.zst dexon-0x-contracts-55dbb0ece06d17a9db7b93a0ffa274ff65298002.zip |
Always append monorepo root path so script can be called from anywhere
-rw-r--r-- | packages/monorepo-scripts/src/postpublish_utils.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/monorepo-scripts/src/postpublish_utils.ts b/packages/monorepo-scripts/src/postpublish_utils.ts index 37861f0dd..77def309e 100644 --- a/packages/monorepo-scripts/src/postpublish_utils.ts +++ b/packages/monorepo-scripts/src/postpublish_utils.ts @@ -96,7 +96,7 @@ export const postpublishUtils = { const notes = postpublishUtils.getReleaseNotes(packageName, version); const releaseName = postpublishUtils.getReleaseName(packageName, version); const tag = postpublishUtils.getTag(packageName, version); - postpublishUtils.adjustAssetPaths(cwd, assets); + postpublishUtils.adjustAssetPaths(assets); utils.log('POSTPUBLISH: Releasing ', releaseName, '...'); await publishReleaseAsync({ token: constants.githubPersonalAccessToken, @@ -145,10 +145,12 @@ export const postpublishUtils = { const releaseName = `${subPackageName} v${version}`; return releaseName; }, - adjustAssetPaths(cwd: string, assets: string[]): string[] { + // Asset paths should described from the monorepo root. This method prefixes + // the supplied path with the absolute path to the monorepo root. + adjustAssetPaths(assets: string[]): string[] { const finalAssets: string[] = []; _.each(assets, (asset: string) => { - finalAssets.push(`${cwd}/${asset}`); + finalAssets.push(`${constants.monorepoRootPath}/${asset}`); }); return finalAssets; }, |