diff --git a/bump_version.py b/bump_version.py old mode 100644 new mode 100755 index 2dddb27176..d0e8dac8db --- a/bump_version.py +++ b/bump_version.py @@ -1,3 +1,5 @@ +#! /usr/bin/env python3 + """ This script is used to bump the version of the Wazuh packages repository. Copyright (C) 2015-2020, Wazuh Inc. @@ -29,7 +31,7 @@ version=Version(args.version) ## Find files to bump .spec, changelog, pkginfo, .pkgproj, test-*.sh, -## installVariables.sh, CHANGELOG.md +## installVariables.sh, unattended_installer/builder.sh, CHANGELOG.md spec_files=glob.glob('**/*.spec', recursive=True) changelog_files=glob.glob('**/changelog', recursive=True) copyright_files=glob.glob('**/copyright', recursive=True) @@ -37,6 +39,7 @@ pkgproj_files=glob.glob('**/*.pkgproj', recursive=True) test_files=glob.glob('**/test-*.sh', recursive=True) install_variables_files=glob.glob('**/installVariables.sh', recursive=True) +unattended_builder_files=glob.glob('**/unattended_installer/builder.sh', recursive=True) changelog_md_files=glob.glob('**/CHANGELOG.md', recursive=True) VERSION_files=glob.glob('**/VERSION', recursive=True) @@ -171,6 +174,19 @@ with open(install_variables_file, 'w', encoding="utf-8") as file: file.write(filedata) +## Bump version in unattended installer build file + +for builder_file in unattended_builder_files: + with open(builder_file, 'r', encoding="utf-8") as file: + print('Bumping version in ' + builder_file) + filedata=file.read() + # Replace version and revision + REGEX=r'source_branch="(\d+\.\d+\.\d+)"' + filedata=re.sub(REGEX, f'source_branch="{version}"', filedata) + + with open(builder_file, 'w', encoding="utf-8") as file: + file.write(filedata) + ## Bump version in CHANGELOG.md files for changelog_md_file in changelog_md_files: diff --git a/hello b/hello deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/unattended_installer/builder.sh b/unattended_installer/builder.sh index 870d7e4bc9..f0819fa22b 100755 --- a/unattended_installer/builder.sh +++ b/unattended_installer/builder.sh @@ -16,7 +16,7 @@ readonly resources_certs="${base_path_builder}/cert_tool" readonly resources_passwords="${base_path_builder}/passwords_tool" readonly resources_common="${base_path_builder}/common_functions" readonly resources_download="${base_path_builder}/downloader" -source_branch="4.8.1" +source_branch="4.8.2" function getHelp() {