-1

The AngularJS commit message format is a set of rules for how to your commit message should look. It has been adopted by AngularJS and other projects. According to these rules, a commit must be labeled in its subject with one of the following commit types:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing or correcting existing tests
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation

What type should a commit have if it only bumps a version number that is stored in the code? E.g., it could be the message that the program foo prints when you run foo --version or the return value of your_framework.version(). It doesn't seem like a chore because it changes what the code itself does. Is it a feat? (I have not found such commits in the history of AngularJS and another project, so it could be that they just aren't used.)

  • 1
    Why do you think that bumping a version number changes what the code does? It may change the output, but it doesn't change the functionality. It seems like it's also directly related to build process. – Thomas Owens Nov 6 '17 at 16:09
  • @ThomasOwens, I consider this to be a change in functionality because the code produces a different output for an identical input. Viewed as a function of input, the program has changed. Of course, this is not the only possible way to view "functionality" and reflects my bias towards functional programming. – nwk Nov 6 '17 at 18:09
1

As with any process, adopt it to your needs. The value of the convention offered by AngularJS is that each commit necessarily remains focused, and that the scope/impact of a commit can be assessed more easily. As long as you adhere to the spirit of this process, there is no problem with extending or changing this categorization.

  • You could expand the meaning of chore to include the administrative work leading up to a release (e.g. bumping versions in various places).

  • You could introduce another commit message format like release v1.2.3 which is used for release candidates.

Depending on how you deploy your software, you may decide not to hardcode any version number at any point. Instead, the version number is inserted into the software by the build process. This is mostly appropriate for compiled programs where the source code is not directly executed. But even for “interpreted” languages it is often a good idea to perform versioning only with your source control and build system, and not duplicate the version number in code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.