Skip to content

Commit

Permalink
Updated VERSION file to the new standard
Browse files Browse the repository at this point in the history
  • Loading branch information
c-bordon committed Feb 18, 2025
1 parent 45750a7 commit 12d72c8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/builder_OVA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:

- name: Setting FILENAME var
run: |
WAZUH_VERSION=$(cat wazuh-installation-assistant/VERSION)
WAZUH_VERSION=$(jq -r '.version' wazuh-virtual-machines/VERSION.json)
COMMIT_SHA=$(git rev-parse --short ${{ github.sha }})
echo "WAZUH_VERSION=$WAZUH_VERSION" >> $GITHUB_ENV
FILENAME="wazuh-${WAZUH_VERSION}-${{ inputs.ova_revision }}"
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/packages_builder_ami.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ jobs:
role-to-assume: ${{ secrets.AWS_IAM_OVA_ROLE }}
aws-region: us-east-1

- name: Install jq
run: sudo apt-get install jq

- name: Get Wazuh version
run: |
WAZUH_VERSION=$(cat VERSION)
WAZUH_VERSION=$(jq -r '.version' VERSION.json)
echo WAZUH_VERSION=$WAZUH_VERSION >> $GITHUB_ENV
- name: Install Python and create virtual environment
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

4 changes: 4 additions & 0 deletions VERSION.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"version": "4.12.0",
"stage": "alpha0"
}
6 changes: 3 additions & 3 deletions ova/generate_ova.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ scriptpath=$(
OUTPUT_DIR="${scriptpath}/output"
CHECKSUM_DIR="${scriptpath}/checksum"

VERSION_FILE="../VERSION"
VERSION_FILE="../VERSION.json"

PACKAGES_REPOSITORY="prod"
CHECKSUM="no"
Expand Down Expand Up @@ -212,7 +212,7 @@ main() {
CHECKSUM_DIR="${OUTPUT_DIR}"
fi

OVA_VERSION=$(cat ${VERSION_FILE})
OVA_VERSION=$(grep -oP '"version":\s*"\K[^"]+' ${VERSION_FILE})
if [ "${OVA_VERSION:0:1}" == "v" ]; then
OVA_VERSION=${OVA_VERSION:1}
fi
Expand Down Expand Up @@ -242,7 +242,7 @@ main() {
git clone ${WAZUH_INSTALLATION_ASSISTANT_URL} -b ${INSTALLATION_ASSISTANT_BRANCH} >> /dev/null 2>&1
echo "Using ${INSTALLATION_ASSISTANT_BRANCH} branch of ${WAZUH_INSTALLATION_ASSISTANT} repository"
cd ${WAZUH_INSTALLATION_ASSISTANT}
WIA_VERSION=$(cat VERSION)
WIA_VERSION=$(grep -oP '"version":\s*"\K[^"]+' VERSION.json)
if [ "${OVA_VERSION}" != "${WIA_VERSION}" ]; then
echo "Wazuh installation assistant version ${WIA_VERSION} does not match with OVA version ${OVA_VERSION}"
clean 1
Expand Down

0 comments on commit 12d72c8

Please sign in to comment.