Skip to content

Commit db97e2e

Browse files
authored
Add defaults to CI script (#1261)
1 parent 3c6f6de commit db97e2e

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

scripts/check_secrets.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
check_secrets()
2222
{
23-
if [[ "$have_secrets" != true ]]; then
23+
if [[ "${have_secrets:-}" != true ]]; then
2424
have_secrets=false
2525

2626
# GitHub Actions: Secrets are available if we're not running on a fork

scripts/test.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,27 @@
2020

2121
set -euo pipefail
2222

23+
# Set default parameters
24+
if [[ -z "${SPM:-}" ]]; then
25+
SPM=false
26+
echo "Defaulting to SPM=$SPM"
27+
if [[ -z "${LEGACY:-}" ]]; then
28+
LEGACY=false
29+
echo "Defaulting to LEGACY=$LEGACY"
30+
fi
31+
fi
32+
if [[ -z "${OS:-}" ]]; then
33+
OS=iOS
34+
DEVICE="iPhone 11"
35+
echo "Defaulting to OS=$OS"
36+
echo "Defaulting to DEVICE=$DEVICE"
37+
fi
38+
if [[ -z "${TEST:-}" ]]; then
39+
TEST=true
40+
echo "Defaulting to TEST=$TEST"
41+
fi
42+
2343
# Set have_secrets to true or false.
24-
have_secrets=false
2544
source scripts/check_secrets.sh
2645

2746
# Get Xcode version

0 commit comments

Comments
 (0)