Skip to content

Commit

Permalink
ci-automation/image-changes: Simplify a bit
Browse files Browse the repository at this point in the history
We can strip suffixes using an array notation instead of doing it in a
loop. Also drop an unused architecture parameter.
  • Loading branch information
krnowak committed Aug 15, 2024
1 parent d2ce797 commit 248057d
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions ci-automation/image_changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function run_image_changes_job() {

local -a oemids base_sysexts extra_sysexts
get_oem_id_list . "${arch}" oemids
get_base_sysext_list . "${arch}" base_sysexts
get_base_sysext_list . base_sysexts
get_extra_sysext_list . extra_sysexts
generate_image_changes_report \
"${version_description}" "${report_file_name}" "${fbs_repo}" \
Expand Down Expand Up @@ -276,16 +276,11 @@ function get_oem_id_list() {

function get_base_sysext_list() {
local scripts_repo=${1}; shift
local arch=${1}; shift
local -n list_var_ref=${1}; shift

source "${scripts_repo}/ci-automation/base_sysexts.sh" 'local'

list_var_ref=()
local entry
for entry in "${ciabs_base_sysexts[@]}"; do
list_var_ref+=( "${entry%%:*}" )
done
list_var_ref=( "${ciabs_base_sysexts[@]%%:*}" )
}

function get_extra_sysext_list() {
Expand All @@ -296,11 +291,7 @@ function get_extra_sysext_list() {
local -a EXTRA_SYSEXTS
source "${scripts_repo}/build_library/extra_sysexts.sh"

list_var_ref=()
local entry
for entry in "${EXTRA_SYSEXTS[@]}"; do
list_var_ref+=( "${entry%%:*}" )
done
list_var_ref=( "${EXTRA_SYSEXTS[@]%%:*}" )
}

# Generates reports with passed parameters. The report is redirected
Expand Down

0 comments on commit 248057d

Please sign in to comment.