Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new versioning methodology #5052

Closed
4 of 6 tasks
AlexRuiz7 opened this issue Dec 29, 2022 · 3 comments · Fixed by #5060, #5077 or #5078
Closed
4 of 6 tasks

Implement new versioning methodology #5052

AlexRuiz7 opened this issue Dec 29, 2022 · 3 comments · Fixed by #5060, #5077 or #5078
Assignees
Labels
type/enhancement Enhancement issue

Comments

@AlexRuiz7
Copy link
Member

AlexRuiz7 commented Dec 29, 2022

Description

We currently use 3 properties in the package.json file to handle the versioning of the app. These are:

  • version: the Wazuh version. Follows the major.minor.patch pattern.
  • revision: used to be the version without dots. Two digits were appended to specify the build number. This was only changed when the version had changed. Example: 4400.
  • code: unused at the moment. Usually set to the same value as the revision.

https:/wazuh/wazuh-kibana-app/blob/130cd255ba7a0f37ffaa4e5c11efefca46edea76/package.json#L3-L5

Instead, we would like to simplify and standardize the versioning method we use, to follow this approach:

  • version: untouched. Follows the major.minor.patch pattern
  • revision: represents the build number. It is a number of 2 digits, starting at 00 and increased by one each time a package for the same version is built. This value is reset only when the version changes.
  • stage: replaces the code property which has no actual use. With this property, we'll represent the stage of development at which the package has been built at: pre-alpha (development), alpha, beta, release-candidate or stable (production).
  • commit: we'll also include the short SHA of the latest commit included in the package (can also be the SHA of the commit used to tag). With this, we'll be able to have a clear reference of what was included in the package.

Software_dev2 svg (1)

Tasks

  • Check the code property is actually unused.
  • Replace the code property with stage.
  • Add the commit property.
  • Add validation. Validate that version, revision and stage contain expected values.
  • Update the build workflow, if required.
  • (Optional) Automate the process with a build script.

Related issues

@AlexRuiz7 AlexRuiz7 added the type/enhancement Enhancement issue label Dec 29, 2022
@AlexRuiz7 AlexRuiz7 self-assigned this Dec 30, 2022
@AlexRuiz7
Copy link
Member Author

AlexRuiz7 commented Dec 30, 2022

I've set up 2 development environments (7.10 and 7.17) on which I have changed code with stage and no errors were raised.

@AlexRuiz7
Copy link
Member Author

@yenienserrano
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment