Skip to content

chore: add standard-version and release script #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

lance
Copy link
Member

@lance lance commented Apr 27, 2020

This commit adds the standard-version module for managing releases.
When running npm run release the following steps are taken.

  1. Retreive the current version of your repository by looking at package.json.
  2. Bump the version in package.json based on the commits.
  3. Prepends to the CHANGELOG based on the commits (uses conventional-changelog under the hood).
  4. Create a new commit including the package.json and updated CHANGELOG.
  5. Create a new tag with the new version number.

This works best if all commits follow the Conventional Commits specification.
https://www.conventionalcommits.org/en/v1.0.0/

Fixes: #56

@lance lance force-pushed the 56-add-standard-version branch from d1c6995 to f140aa8 Compare April 27, 2020 20:40
@grant
Copy link
Member

grant commented Apr 28, 2020

Looks good to me besides the conflicts.

@fabiojose
Copy link
Contributor

@lance could you fix the conflicts and remove the package-lock.json?

@lance lance force-pushed the 56-add-standard-version branch from f140aa8 to 815865d Compare April 28, 2020 19:36
@lance
Copy link
Member Author

lance commented Apr 28, 2020

@fabiojose conflicts have been resolved.

I suggest keeping package-lock.json. It was intentionally added by me in aa2cef6. Standard best practices (and npm documentation recommend keeping these in your source repositories.

@grant
Copy link
Member

grant commented Apr 28, 2020

Looks mergeable to me. Please keep the lock as is standard practice. 👍
Will wait for Fabio's response.

@lance
Copy link
Member Author

lance commented Apr 28, 2020

@fabiojose do you think it would be possible to avoid doing a Merge commit on these, but instead do a Squash and Merge or Squash and Rebase? When performing merge commits, we get commits in the commit log that look like this:

Merge pull request #55 from lance/54-add-linter …

A squash and merge will make it so that the commit log is cleaner, with only messages like this:

src: add eslint configuration and npm script …

For standard-version to automatically format and document the changelog, it's best if all commits in the commit log follow the Conventional Commits spec. thanks!

@fabiojose
Copy link
Contributor

Yes, off course!

@grant
Copy link
Member

grant commented Apr 28, 2020

@fabiojose do you think it would be possible to avoid doing a Merge commit on these, but instead do a Squash and Merge or Squash and Rebase? When performing merge commits, we get commits in the commit log that look like this:

Merge pull request #55 from lance/54-add-linter …

A squash and merge will make it so that the commit log is cleaner, with only messages like this:

src: add eslint configuration and npm script …

For standard-version to automatically format and document the changelog, it's best if all commits in the commit log follow the Conventional Commits spec. thanks!

I've disabled merge commits and only allowed squash/rebase.

@fabiojose
Copy link
Contributor

@lance could you update the section Changelog at https://github.com/cloudevents/sdk-javascript/blob/master/CONTRIBUTING.md?

Please add links or tips for incoming contributors.

@lance lance force-pushed the 56-add-standard-version branch from 815865d to 396e4b0 Compare April 28, 2020 21:45
@lance lance force-pushed the 56-add-standard-version branch from 396e4b0 to 042db05 Compare April 28, 2020 22:15
This commit adds the `standard-version` module for managing releases.
When running `npm run release` the following steps are taken.

1. Retreive the current version of your repository by looking at package.json.
2. Bump the version in package.json based on the commits.
3. Prepends to the CHANGELOG based on the commits (uses conventional-changelog under the hood).
4. Create a new commit including the package.json and updated CHANGELOG.
5. Create a new tag with the new version number.

This works best if all commits follow the Conventional Commits specification.
https://www.conventionalcommits.org/en/v1.0.0/

Fixes: cloudevents#56

Signed-off-by: Lance Ball <[email protected]>
@lance lance force-pushed the 56-add-standard-version branch from 042db05 to ff40b23 Compare April 28, 2020 23:52
@fabiojose fabiojose merged commit f47bca4 into cloudevents:master Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recommend using standard-version for versioning and changelog
3 participants