Skip to content

Commit be00a79

Browse files
committed
[script] use new trusted public URL to download slc_cli zip files
Additionally add some slc debug logging.
1 parent b98ea6a commit be00a79

4 files changed

Lines changed: 24 additions & 5 deletions

File tree

script/bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ install_packages_apt()
5252
coreutils
5353
git
5454
git-lfs
55-
openjdk-17-jre-headless
55+
openjdk-21-jre-headless
5656
ninja-build
5757
python3-pip
5858
python3-setuptools

script/bootstrap_silabs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ install_slc_cli()
5454
os_type="mac"
5555
fi
5656

57-
local zip_url="https://www.silabs.com/documents/login/software/slc_cli_${os_type}.zip"
57+
local zip_url="https://www.silabs.com/documents/public/software/slc_cli_${os_type}.zip"
5858
mkdir -p "${SLC_INSTALL_DIR}"
5959
pushd "${SLC_INSTALL_DIR}"
6060
local zip_path="./slc_cli.zip"

script/generate

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,13 @@ generate()
252252

253253
cleanup()
254254
{
255-
# Placeholder for any cleanup tasks
255+
# print out slc error logs if any
256+
if [ $? -ne 0 ]; then
257+
echo "Checking slc logs..."
258+
find "${SLC_INSTALL_DIR}"/slc_cli/bin/slc-cli/configuration/ -type f -name "*.log" -exec cat {} +
259+
fi
260+
261+
# Placeholder for any other cleanup tasks
256262
:
257263
}
258264

script/slc_cli

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,21 @@ use_slc_from_path=1
4949
# Wrapper function to execute an slc command
5050
run_slc()
5151
{
52-
IFS=" " read -r -a slc_args <<<"${@}"
53-
eval "${slc_cmd}" "${slc_args[*]}"
52+
(
53+
export HOME="${repo_dir}"
54+
export USERPROFILE="${repo_dir}"
55+
export _JAVA_OPTIONS="-Duser.home=${repo_dir}"
56+
57+
set +x
58+
echo "slc environment variables set:"
59+
echo " HOME=${HOME}"
60+
echo " USERPROFILE=${USERPROFILE}"
61+
echo " _JAVA_OPTIONS=${_JAVA_OPTIONS}"
62+
set -x
63+
64+
IFS=" " read -r -a slc_args <<<"${@}"
65+
eval "${slc_cmd}" "${slc_args[*]}"
66+
)
5467
}
5568

5669
# Find the command to use for slc

0 commit comments

Comments
 (0)