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

workflows: meta-balena-esr: fix array creation #3587

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/meta-balena-esr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@

- name: "Calculate versions"
id: calculate-versions
run: |

Check failure on line 92 in .github/workflows/meta-balena-esr.yml

View workflow job for this annotation

GitHub Actions / Flowzone / actionlint

shellcheck reported issue in this script: SC2206:warning:5:6: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a

Check failure on line 92 in .github/workflows/meta-balena-esr.yml

View workflow job for this annotation

GitHub Actions / Flowzone / actionlint

shellcheck reported issue in this script: SC2206:warning:18:10: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a
# The ESR branch starts at the HEAD of the latest minor version
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 @@
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
Loading