Skip to content

Commit

Permalink
Check env before using it.
Browse files Browse the repository at this point in the history
When the TARGET env variable is not set, the script will fail to run.
This patchset add the check and ouput useful hints.

Change-Id: I5167afca9352b5bdc7d96dbe7e9ef25e2e2db69e
Signed-off-by: Baohua Yang <[email protected]>
Signed-off-by: Baohua Yang <[email protected]>
  • Loading branch information
yeasy authored and ale-linux committed Feb 29, 2024
1 parent d3ed16c commit 7424152
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ci/scripts/create_binary_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail

# Check TARGET is non-empty
if [[ -z "$TARGET" ]]; then
echo "Error: TARGET is not set."
exit 1
fi
make "release/${TARGET}"
mkdir -p "release/${TARGET}/config"

Expand Down

0 comments on commit 7424152

Please sign in to comment.