Skip to content

Commit 5675a13

Browse files
NO-JIRA Fix missing package generation on non-LTA branches
1 parent 09d3236 commit 5675a13

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

.cirrus/package.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@ set -xeuo pipefail
1010

1111
PREVIOUS_RELEASE=$(gh api "/repos/{owner}/{repo}/releases" --jq "[.[] | select(.target_commitish==\"${TARGET_BRANCH}\")][1].tag_name")
1212

13-
# There MIGHT be a some edge case where PREVIOUS_RELEASE shouldn't be HEAD,
14-
# for example, releasing a patch for non-LTA. To be investigated.
15-
[[ -z "${PREVIOUS_RELEASE}" ]] && PREVIOUS_RELEASE="HEAD" || echo "${PREVIOUS_RELEASE}"
16-
17-
CHARTS=$(ct list-changed --since "${PREVIOUS_RELEASE}" --target-branch "${TARGET_BRANCH}")
13+
[[ -z "${PREVIOUS_RELEASE}" ]] && CHARTS=("charts/sonarqube-dce" "charts/sonarqube") || CHARTS=$(ct list-changed --since "${PREVIOUS_RELEASE}" --target-branch "${TARGET_BRANCH}")
1814

1915
BUILD_METADATA="-${BUILD_NUMBER}"
2016
[[ ${CIRRUS_RELEASE:-} != "" ]] && BUILD_METADATA=""
2117

22-
echo "${CHARTS}"
18+
echo "${CHARTS[@]}"
2319

24-
for chart in ${CHARTS}; do
20+
for chart in ${CHARTS[@]}; do
2521
_original_version=$(yq '.version' "${chart}"/Chart.yaml)
2622
_new_version="${_original_version}${BUILD_METADATA}"
2723
helm dependency build "${chart}"

0 commit comments

Comments
 (0)