aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-12-03 19:48:53 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-12-03 19:48:53 +0800
commit754be75dbfbb0ea4ca769d8810a76f382f31e031 (patch)
tree777c08d7c3a1dff5bf31a7974c2a1d80e777a04b /packages/monorepo-scripts/src
parent5d70fe053da080c024fd49b832c57b973cc86bc0 (diff)
downloaddexon-sol-tools-754be75dbfbb0ea4ca769d8810a76f382f31e031.tar
dexon-sol-tools-754be75dbfbb0ea4ca769d8810a76f382f31e031.tar.gz
dexon-sol-tools-754be75dbfbb0ea4ca769d8810a76f382f31e031.tar.bz2
dexon-sol-tools-754be75dbfbb0ea4ca769d8810a76f382f31e031.tar.lz
dexon-sol-tools-754be75dbfbb0ea4ca769d8810a76f382f31e031.tar.xz
dexon-sol-tools-754be75dbfbb0ea4ca769d8810a76f382f31e031.tar.zst
dexon-sol-tools-754be75dbfbb0ea4ca769d8810a76f382f31e031.zip
Fix hardcoded path in release notes fetching
Diffstat (limited to 'packages/monorepo-scripts/src')
-rw-r--r--packages/monorepo-scripts/src/utils/github_release_utils.ts12
1 files changed, 3 insertions, 9 deletions
diff --git a/packages/monorepo-scripts/src/utils/github_release_utils.ts b/packages/monorepo-scripts/src/utils/github_release_utils.ts
index 7434d397e..e63244b46 100644
--- a/packages/monorepo-scripts/src/utils/github_release_utils.ts
+++ b/packages/monorepo-scripts/src/utils/github_release_utils.ts
@@ -41,7 +41,7 @@ export async function publishReleaseNotesAsync(packagesToPublish: Package[], isD
let assets: string[] = [];
let aggregateNotes = '';
_.each(packagesToPublish, pkg => {
- aggregateNotes += getReleaseNotesForPackage(pkg.packageJson.name);
+ aggregateNotes += getReleaseNotesForPackage(pkg.location, pkg.packageJson.name);
const packageAssets = _.get(pkg.packageJson, 'config.postpublish.assets');
if (!_.isUndefined(packageAssets)) {
@@ -88,14 +88,8 @@ function adjustAssetPaths(assets: string[]): string[] {
return finalAssets;
}
-function getReleaseNotesForPackage(packageName: string): string {
- const packageNameWithoutNamespace = packageName.replace('@0x/', '');
- const changelogJSONPath = path.join(
- constants.monorepoRootPath,
- 'packages',
- packageNameWithoutNamespace,
- 'CHANGELOG.json',
- );
+function getReleaseNotesForPackage(packageLocation: string, packageName: string): string {
+ const changelogJSONPath = path.join(packageLocation, 'CHANGELOG.json');
const changelogJSON = readFileSync(changelogJSONPath, 'utf-8');
const changelogs = JSON.parse(changelogJSON);
const latestLog = changelogs[0];