aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-26 20:42:07 +0800
committerFabio Berger <me@fabioberger.com>2018-07-26 20:42:07 +0800
commit55dbb0ece06d17a9db7b93a0ffa274ff65298002 (patch)
tree6089bddc51b548e768d04e4732feca106302ec57 /packages/monorepo-scripts
parentaf4071e119b4cb651ae311ea1200fdd76f8123e7 (diff)
downloaddexon-sol-tools-55dbb0ece06d17a9db7b93a0ffa274ff65298002.tar
dexon-sol-tools-55dbb0ece06d17a9db7b93a0ffa274ff65298002.tar.gz
dexon-sol-tools-55dbb0ece06d17a9db7b93a0ffa274ff65298002.tar.bz2
dexon-sol-tools-55dbb0ece06d17a9db7b93a0ffa274ff65298002.tar.lz
dexon-sol-tools-55dbb0ece06d17a9db7b93a0ffa274ff65298002.tar.xz
dexon-sol-tools-55dbb0ece06d17a9db7b93a0ffa274ff65298002.tar.zst
dexon-sol-tools-55dbb0ece06d17a9db7b93a0ffa274ff65298002.zip
Always append monorepo root path so script can be called from anywhere
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r--packages/monorepo-scripts/src/postpublish_utils.ts8
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;
},