Semver #235
-
We will need to Semver bump Hyper adapters, ports, and apps. Ideally, this would be an automated process. In order to automate this process, there is a typical strategy used. First, commit message format is usually standardized. A popular spec for commit message format can be found here. Once commit messages are standardized, another tool is usually used to inspect the commit messages, since the last marker (usually a git tag). This determines if the version bump will be MAJOR MINOR or PATCH bump. Finally, a tool takes the new version and will bump manifest files, generate changelogs, and create a new git tag. So we have:
There are tools that already enforce and perform the work described above. Some of these tools: "linting" commit messages: commitlint + pre-commit hook like husky (commitlint via pre-commit hook) 1 Inspecting commit messages, bumping manifests, tag and changelog generation: standard-version or semantic-release 2&3 The problem is that these tools are not working with Deno, via skypack. We may be able to replace tools like Husky with just vanilla git pre-commit hooks, but replacing tools like Option 1 - use Node and npm for these toolseach package would have a As the Deno ecosystem becomes more mature, we can remove Option 2 - use Node and npm for CI tooling, but don't programmatically enforce commit messagesThis is similar to option 1, but doesn't use tooling to enforce commit message. maintainers would need to go in on PRs and clean up commit messages prior to merging into main. This is similar to what the deno core team does. Then only CI has a dependency on Node to semver bump an tag. The extra burden is that maintainers would need to ensure commits are cleaned up, prior to merges to Option 3 - build these tools on DenoNo dependency on Node or npm. We would copy pasta code where we could from these tools and create our own tooling for enforcing commit message format, inspecting commit messages, bumping and tagging, and generating changelogs. I believe this would take the most time, but would stay in the Deno ecosystem. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
At first glance, I'm leaning toward option 1. Although, on a side note, I am skeptical that an effective changelog could be generated with useful information based on commit messages. |
Beta Was this translation helpful? Give feedback.
-
Another option that just came to mind: Use Node and NPM for CI tooling, CI installing tools it needs for semverSimilar to how CI might install tooling to perform certain tasks ie. install The most we'd have to build is add a pre-commit hook to lint commit messages, if we wanted to do that. |
Beta Was this translation helpful? Give feedback.
Another option that just came to mind:
Use Node and NPM for CI tooling, CI installing tools it needs for semver
Similar to how CI might install tooling to perform certain tasks ie. install
node
, installyarn
, install CLIs, etc. CI would install all the tooling in the CI environment from npm, it needs to semver bump. This means nopackage.json
is in the repo, and we don't have to build out the tooling ourselves.The most we'd have to build is add a pre-commit hook to lint commit messages, if we wanted to do that.