kaliberjs / firebase-queue

A trimmed and more robust version of the original Firebase Queue
MIT License
20 stars 3 forks source link

Add a convenient release workflow #2

Closed EECOLOR closed 6 years ago

EECOLOR commented 6 years ago

Currently I want to use the following tools:

semantic release Determines the (semantic) version based on the commit messages. It also publishes to npm and creates a GitHub release.

commitlint Validates the commit message using a git hook.

husky Allows the installation of commit hooks (coded in javascript) through configuration present in the reposity.

Git itself does not have such a feature for security reasons. The fact that npm and yarn do support running arbitrary code on installation is a huge security risk. There is however no way (that I know of) to make prevention of automatically running the default behavior (which it should be). It should at least ask permission.

Anyway, we will follow what the world is doing.

??? We need something to ease the creation of the appropriate commit message.

The best option here (at the moment) is commitizen. This one however requires you to commit using a different command. Making the use of other git tools (vscode, smartgit, commandline, ...) tricky.

For integration with other tools we could use a git hook that supplies a git commit template. An example that provides this would be: commit-template.

An alternative of the commit-template package would be using the config variable commit.template of git itself. This however would need to be set using an npm hook to prevent users from the need to configure this manually. So that would effectively result in the same behavior as the one supplied by commit-template.

For vscode the following is available: https://marketplace.visualstudio.com/items?itemName=KnisterPeter.vscode-commitizen. It however also support git commit templates: https://github.com/Microsoft/vscode/issues/7830

EECOLOR commented 6 years ago

@klaaz0r Do you have an opinion on the above?

EECOLOR commented 6 years ago

:tada: This issue has been resolved in version 1.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: