Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Fix generation of changelog during release:prepare #1355

Merged
merged 1 commit into from
Apr 13, 2019
Merged

Fix generation of changelog during release:prepare #1355

merged 1 commit into from
Apr 13, 2019

Conversation

edmorley
Copy link
Member

Previously we were using auto-changelog's --package option, which does not work with Lerna monorepos, since there is no version in the repo root package.json. Now the version is instead read from lerna.json.

In addition, SKIP_CHANGELOG has been removed, since:
(a) using environment variables in package.json scripts makes them incompatible with Windows
(b) we now use the --no-git-reset option with release:ci, so the working directory will be dirty regardless, so it's fine to modify the changelog too (and it means changelog generation has CI coverage)

Finally, some of the other release process steps have been converted to package.json scripts to simplify the steps.

Fixes #762.

Previously we were using auto-changelog's `--package` option, which does
not work with Lerna monorepos, since there is no version in the repo root
`package.json`. Now the version is instead read from `lerna.json`.

In addition, `SKIP_CHANGELOG` has been removed, since:
(a) using environment variables in package.json scripts makes them
    incompatible with Windows
(b) we now use the `--no-git-reset` option with `release:ci`, so the
    working directory will be dirty regardless, so it's fine to modify
    the changelog too (and it means changelog generation has CI coverage)

Finally, some of the other release process steps have been converted to
package.json scripts to simplify the steps.

Fixes #762.
@edmorley edmorley self-assigned this Apr 13, 2019
@@ -15,16 +15,20 @@
"packages/*"
],
"scripts": {
"changelog": "auto-changelog --latest-version $(yarn -s print-version)",
Copy link
Member Author

@edmorley edmorley Apr 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of bash subcommands ($(...)) makes this command not compatible with Windows (same as before this change, albeit now for a different reason), however this can be resolved by fixing cookpete/auto-changelog#106.

@edmorley edmorley requested a review from eliperelman April 13, 2019 18:05
Copy link
Member

@eliperelman eliperelman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

@edmorley edmorley merged commit 6ae6bdb into neutrinojs:master Apr 13, 2019
@edmorley edmorley deleted the fix-changelog-generation branch April 13, 2019 21:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

'yarn version' fails with 'TypeError: Invalid Version: vundefined'
2 participants