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

Bump 4.9.2 rev 00 #7126

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to the Wazuh app project will be documented in this file.

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

### Added

- Support for Wazuh 4.9.2

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

### Added
Expand Down
2 changes: 1 addition & 1 deletion docker/imposter/wazuh-config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
plugin: openapi
specFile: https://raw.githubusercontent.com/wazuh/wazuh/master/api/api/spec/spec.yaml
specFile: https://raw.githubusercontent.com/wazuh/wazuh/4.9.2/api/api/spec/spec.yaml
system:
stores:
# this store is preloaded from file
Expand Down
2 changes: 1 addition & 1 deletion plugins/main/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "wazuh",
"version": "4.9.1-04",
"version": "4.9.2-00",
"opensearchDashboardsVersion": "opensearchDashboards",
"configPath": ["wazuh"],
"requiredPlugins": [
Expand Down
4 changes: 2 additions & 2 deletions plugins/main/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wazuh",
"version": "4.9.1",
"revision": "04",
"version": "4.9.2",
"revision": "00",
"pluginPlatform": {
"version": "2.13.0"
},
Expand Down
43 changes: 43 additions & 0 deletions plugins/main/scripts/release/bump.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,47 @@ const cli = require('../../../../scripts/lib/cli/cli')(
],
);

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);
}
}

function run(configuration, logger) {
let localConfiguration = {
...configuration,
Expand Down Expand Up @@ -90,6 +131,8 @@ function run(configuration, logger) {
);
process.exit(1);
}

updateImposterSpecificationReference(localConfiguration, logger);
}

const logger = require('../../../../scripts/release/lib/logger').create([
Expand Down
2 changes: 1 addition & 1 deletion plugins/wazuh-check-updates/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "wazuhCheckUpdates",
"version": "4.9.1-04",
"version": "4.9.2-00",
"opensearchDashboardsVersion": "opensearchDashboards",
"server": true,
"ui": true,
Expand Down
4 changes: 2 additions & 2 deletions plugins/wazuh-check-updates/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wazuh-check-updates",
"version": "4.9.1",
"revision": "04",
"version": "4.9.2",
"revision": "00",
"pluginPlatform": {
"version": "2.13.0"
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/wazuh-core/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "wazuhCore",
"version": "4.9.1-04",
"version": "4.9.2-00",
"opensearchDashboardsVersion": "opensearchDashboards",
"server": true,
"ui": true,
Expand Down
4 changes: 2 additions & 2 deletions plugins/wazuh-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wazuh-core",
"version": "4.9.1",
"revision": "04",
"version": "4.9.2",
"revision": "00",
"pluginPlatform": {
"version": "2.13.0"
},
Expand Down
Loading