wazuh / wazuh-packages

Wazuh - Tools for packages creation
https://wazuh.com
GNU General Public License v2.0
100 stars 90 forks source link

Update `bump_version.py` to track new variables #2799

Closed mjcr99 closed 5 months ago

mjcr99 commented 6 months ago
Related issue
https://github.com/wazuh/wazuh-packages/issues/2728

Description

This PR updates the bump_version.py file to update the variable source_branch in the /unattended_installer/builder.sh file. The issue requested to track the installVariables.sh file, but it's already done by the script.

Logs example

When the script is executed the Bumping version in unattended_installer/builder.sh log appears and the source_branch variable contained is properly updated.

mjcr99 commented 5 months ago

To test this refactorized script the branch test-fix/2728-update-bump-script-to-update-wia-variables has been updated and the script has been called as follows: bump_version.py -v 5.0.0 -r 2 -d 01-02-2003.

This commit https://github.com/wazuh/wazuh-packages/commit/577b60e91462f57c3a0638711ffca788c7149367 shows what changes are performed.

To compare with the current way files are bumped, this commit https://github.com/wazuh/wazuh-packages/pull/2736/commits/c9867c337980bc8d11023212e536aea0ccbfce75 can be checked. It's seen every file is updated as expected.

lchico commented 5 months ago

I tested running the script by hand and compared the output, which worked as expected. Great job, @mjcr99! LGTM!