Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Use npm/yarn scripts to facilitate versioning #234

Closed
bcomnes opened this issue Dec 7, 2018 · 0 comments
Closed

Use npm/yarn scripts to facilitate versioning #234

bcomnes opened this issue Dec 7, 2018 · 0 comments
Assignees

Comments

@bcomnes
Copy link
Contributor

bcomnes commented Dec 7, 2018

Right now we use a bash script running npm scripts to generate the changelog:

https://github.com/netlify/build-image/blob/12783d4d177a66bec5a23ad1097ea7bd02931128/gen-changelog.sh

There are a couple of problems with this approach:

  • Global dependencies via npm. Requires anyone performing the release process to install a global tool.
  • Requires user input: You need to run ./gen-changelog.sh -v vX.X.X. This requires remembering which flags and manual version formatting which is troublesome to remember.

There are a few things we could improve on that flow:

  • Add a package.json to the project and add a couple of release scripts.
  • Eliminates global peer dependencies (project local)
  • Auto-version bumping. All you have to do is npm version [major, minor, patch] && npm run release and it creates the changelog, creates the version commit and tag, pushes it to github, and updates gh-release with the new section.
  • Ensures lots of release steps are automated and done consistently.
  • Works with npm or yarn.
  • We can wrap in a Make file if we want.

We did something similar for the cli and I really enjoy the workflow: https://github.com/netlify/cli/blob/master/package.json#L26-L27

@bcomnes bcomnes self-assigned this Dec 7, 2018
bcomnes added a commit that referenced this issue Dec 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant