Skip to content

Commit 2a857f6

Browse files
Tosttiasteriscos
andauthored
Correct variable case for date parameter in bump script (#886)
Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
1 parent 7dc31d6 commit 2a857f6

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/4_bumper_repository.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,13 @@ jobs:
8787
VERSION: ${{ inputs.version }}
8888
STAGE: ${{ inputs.stage }}
8989
TAG: ${{ inputs.tag }}
90+
DATE: ${{ inputs.date }}
9091
run: |
9192
script_params=""
9293
version=${{ env.VERSION }}
9394
stage=${{ env.STAGE }}
9495
tag=${{ env.TAG }}
96+
date=${{ env.DATE }}
9597
9698
# Both version and stage provided
9799
if [[ -n "$version" && -n "$stage" && "$tag" != "true" ]]; then
@@ -102,8 +104,8 @@ jobs:
102104
script_params="--tag"
103105
fi
104106
105-
if [[ -n "$DATE" ]]; then
106-
script_params+=" --date ${DATE}"
107+
if [[ -n "$date" ]]; then
108+
script_params+=" --date ${date}"
107109
fi
108110
109111
issue_number=$(echo "${{ inputs.issue-link }}" | awk -F'/' '{print $NF}')

.github/workflows/5_bumper_repository.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,13 @@ jobs:
8787
VERSION: ${{ inputs.version }}
8888
STAGE: ${{ inputs.stage }}
8989
TAG: ${{ inputs.tag }}
90+
DATE: ${{ inputs.date }}
9091
run: |
9192
script_params=""
9293
version=${{ env.VERSION }}
9394
stage=${{ env.STAGE }}
9495
tag=${{ env.TAG }}
96+
date=${{ env.DATE }}
9597
9698
# Both version and stage provided
9799
if [[ -n "$version" && -n "$stage" && "$tag" != "true" ]]; then
@@ -102,8 +104,8 @@ jobs:
102104
script_params="--tag"
103105
fi
104106
105-
if [[ -n "$DATE" ]]; then
106-
script_params+=" --date ${DATE}"
107+
if [[ -n "$date" ]]; then
108+
script_params+=" --date ${date}"
107109
fi
108110
109111
issue_number=$(echo "${{ inputs.issue-link }}" | awk -F'/' '{print $NF}')

.github/workflows/6_bumper_repository.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,13 @@ jobs:
8787
VERSION: ${{ inputs.version }}
8888
STAGE: ${{ inputs.stage }}
8989
TAG: ${{ inputs.tag }}
90+
DATE: ${{ inputs.date }}
9091
run: |
9192
script_params=""
9293
version=${{ env.VERSION }}
9394
stage=${{ env.STAGE }}
9495
tag=${{ env.TAG }}
96+
date=${{ env.DATE }}
9597
9698
# Both version and stage provided
9799
if [[ -n "$version" && -n "$stage" && "$tag" != "true" ]]; then
@@ -102,8 +104,8 @@ jobs:
102104
script_params="--tag"
103105
fi
104106
105-
if [[ -n "$DATE" ]]; then
106-
script_params+=" --date ${DATE}"
107+
if [[ -n "$date" ]]; then
108+
script_params+=" --date ${date}"
107109
fi
108110
109111
issue_number=$(echo "${{ inputs.issue-link }}" | awk -F'/' '{print $NF}')

tools/repository_bumper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ update_deb_changelog() {
640640
log "Debian changelog entry for version $VERSION already exists. Updating date..."
641641
# Update existing entry date
642642
# Find the line with the version and then find the next maintainer line to update
643-
sed -i "/wazuh-dashboard ($escaped_package_version)/,/^-- Wazuh, Inc/ s|^-- Wazuh, Inc <info@wazuh.com> .*|$maintainer_line|" "$DEB_CHANGELOG"
643+
sed -i "/wazuh-dashboard ($escaped_package_version)/,/^ *-- Wazuh, Inc/ s|^ *-- Wazuh, Inc <info@wazuh.com> .*|$maintainer_line|" "$DEB_CHANGELOG"
644644
log "Successfully updated Debian changelog date for version $VERSION"
645645
else
646646
log "Adding new Debian changelog entry for version $VERSION..."

0 commit comments

Comments
 (0)