Skip to content

Commit

Permalink
Merge 4.9.2 into 4.10.0 (#7138)
Browse files Browse the repository at this point in the history
Merge 4.9.2 into 4.10.0
  • Loading branch information
Desvelao authored Nov 5, 2024
2 parents 11cb294 + 85a0ea1 commit 26bae3d
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ All notable changes to the Wazuh app project will be documented in this file.
- Removed VirusTotal application in favor of Malware Detection [#7038](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7038)
- Removed processes state column in macOS agents [#7122](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7122)

## Wazuh v4.9.2 - OpenSearch Dashboards 2.13.0 - Revision 01

### Added

- Support for Wazuh 4.9.2

### Fixed

- Fixed vulnerabilities inventory table scroll [#7128](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7128)

## Wazuh v4.9.1 - OpenSearch Dashboards 2.13.0 - Revision 04

### Added
Expand Down
5 changes: 5 additions & 0 deletions scripts/release/bump.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const { updatePluginManifest } = require('./lib/update-manifest-plugin');
const { updateChangelog } = require('./lib/update-changelog');
const path = require('path');
const fs = require('fs');
const {
updateImposterSpecificationReference,
} = require('./lib/update-imposter');

const cli = require('../lib/cli/cli')(
cliName,
Expand Down Expand Up @@ -341,6 +344,8 @@ function run(configuration) {
},
logger,
);

updateImposterSpecificationReference(configuration, logger);
}

function main() {
Expand Down
43 changes: 43 additions & 0 deletions scripts/release/lib/update-imposter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
function updateImposterSpecificationReference(configuration, logger) {
try {
logger.debug('Editing imposter specification reference');
const fs = require('fs');
const path = require('path');
const specificationFile = path.join(
__dirname,
'../../..',
'docker/imposter/wazuh-config.yml',
);

logger.debug(`Reading ${specificationFile} file`);
const content = fs.readFileSync(specificationFile, 'utf8');

const { version } = configuration;

if (!version) {
throw new Error('Version is not specified.');
}

// specFile: https://raw.githubusercontent.com/wazuh/wazuh/<BRANCH_VERSION>/api/api/spec/spec.yaml
const updatedContent = content.replace(
/specFile:\s+\S+/m,
`specFile: https://raw.githubusercontent.com/wazuh/wazuh/${version}/api/api/spec/spec.yaml`,
);

if (content !== updatedContent) {
logger.debug(
`Updating [${specificationFile}] imposter specification file with latest changes`,
);
fs.writeFileSync(specificationFile, updatedContent, 'utf8');
logger.info(`${specificationFile} file has been updated`);
} else {
logger.debug(`Nothing to change in ${specificationFile} file`);
}
} catch (error) {
logger.error(`Error editing the specification file: ${error.message}`);
process.exit(1);
}
}

module.exports.updateImposterSpecificationReference =
updateImposterSpecificationReference;

0 comments on commit 26bae3d

Please sign in to comment.