diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-04 02:57:42 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-04-04 02:57:42 +0800 |
commit | 61809130a6659335c7550cf35c55e20b3e579a6f (patch) | |
tree | 19ddd0c0312eed054595c0d3431ecddead18e857 /packages/monorepo-scripts/src/publish.ts | |
parent | f5e6e0eaf7dfa1b50852e897948e89e18aa1716c (diff) | |
parent | 4a9752d7cda05f616d2709e34f4687da813d3090 (diff) | |
download | dexon-sol-tools-61809130a6659335c7550cf35c55e20b3e579a6f.tar dexon-sol-tools-61809130a6659335c7550cf35c55e20b3e579a6f.tar.gz dexon-sol-tools-61809130a6659335c7550cf35c55e20b3e579a6f.tar.bz2 dexon-sol-tools-61809130a6659335c7550cf35c55e20b3e579a6f.tar.lz dexon-sol-tools-61809130a6659335c7550cf35c55e20b3e579a6f.tar.xz dexon-sol-tools-61809130a6659335c7550cf35c55e20b3e579a6f.tar.zst dexon-sol-tools-61809130a6659335c7550cf35c55e20b3e579a6f.zip |
Merge branch 'development' into removeUnusedDeps
* development:
Temporarily remove installation test
Fix package.json
Remove `isPublished` from all CHANGELOG.json filesx
Now that every version of a package published has a corresponding entry in it's CHANGELOG we no longer need the isPublished flag. Remove it.
Remove temporary convert_changelog script
# Conflicts:
# packages/monorepo-scripts/package.json
Diffstat (limited to 'packages/monorepo-scripts/src/publish.ts')
-rw-r--r-- | packages/monorepo-scripts/src/publish.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index d749ec630..adc1de64a 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -48,7 +48,7 @@ const semverNameToIndex: { [semver: string]: number } = { } const currentVersion = lernaPackage.package.version; - const shouldAddNewEntry = shouldAddNewChangelogEntry(changelogs); + const shouldAddNewEntry = shouldAddNewChangelogEntry(currentVersion, changelogs); if (shouldAddNewEntry) { // Create a new entry for a patch version with generic changelog entry. const nextPatchVersion = utils.getNextPatchVersion(currentVersion); @@ -174,12 +174,13 @@ function getChangelogJSONOrCreateIfMissing(packageName: string, changelogPath: s } } -function shouldAddNewChangelogEntry(changelogs: Changelog[]): boolean { +function shouldAddNewChangelogEntry(currentVersion: string, changelogs: Changelog[]): boolean { if (_.isEmpty(changelogs)) { return true; } const lastEntry = changelogs[0]; - return !!lastEntry.isPublished; + const lastEntryCurrentVersion = lastEntry.version === currentVersion; + return lastEntryCurrentVersion; } function generateChangelogMd(changelogs: Changelog[]): string { |