VM-Packages icon indicating copy to clipboard operation
VM-Packages copied to clipboard

Linter should check that the version is increased

Open Ana06 opened this issue 2 years ago • 1 comments

As mentioned in our documentation:

The version needs to be increased every time you modify an existing package.

Otherwise, the higest old version will be installed and tested in our CI and the change in the package won't have effect. The linter should complain about this.

This has been an issue recently in several PR that were using the date as version in the format day.month.year or month.day.year instead of using the tool version. We should use the tool version and not the date. If there is no tool version, the version should be 0.0.0.YYYYMMDD, using the 4th segment for the date. For example:

  • https://github.com/mandiant/VM-Packages/pull/621#discussion_r1318383221
  • https://github.com/mandiant/VM-Packages/pull/632#discussion_r1311492612

The linter should check that the version follows the correct format (this is done already) and also that the version has been increased.

All this is already documented in our wiki, but if someone feels it needs more detail, please improve the Wiki as well. 😄

Ana06 avatar Sep 07 '23 10:09 Ana06

One problem to enforce this in the linter is that it will fail if we decrease the version because it is wrong. We have done this a few times by deleting the current packages in myget. Example: https://github.com/mandiant/VM-Packages/pull/890#pullrequestreview-1879793115

Ana06 avatar Feb 19 '24 13:02 Ana06