Skip to content

Commit

Permalink
workflows: meta-balena-esr: fix array creation
Browse files Browse the repository at this point in the history
By removing linter errors and adding quotes inside the array, its
contents become a single element string which is not the intention, as
it should become a semver array.

Change-type: patch
Signed-off-by: Alex Gonzalez <[email protected]>
  • Loading branch information
alexgg committed Jan 1, 2025
1 parent 54af14e commit 616918e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/meta-balena-esr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
git fetch --tags origin
current_os_version=$(git describe --abbrev=0 "$(git rev-list --tags --max-count=1)")
current_os_version="${current_os_version:1}"
va=("${current_os_version//./ }")
va=( ${current_os_version//./ } )
if [ ${#va[@]} -ne 3 ]; then
echo "Invalid current version: ${current_os_version}"
exit 1
Expand All @@ -107,7 +107,7 @@ jobs:
os_version=$(git tag --sort -version:refname | grep "v${va[0]}\." | head -n1)
fi
os_version="${os_version:1}"
ov_arr=( "${os_version//./ }" )
ov_arr=( ${os_version//./ } )
os_esr_branch=${ov_arr[0]}.${ov_arr[1]}.x
if git ls-remote --exit-code --heads origin "${os_esr_branch}" > /dev/null; then
echo "Branch ${os_esr_branch} already exists"
Expand Down

0 comments on commit 616918e

Please sign in to comment.