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

Add defaults to CI script #1261

Merged
merged 1 commit into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion scripts/check_secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

check_secrets()
{
if [[ "$have_secrets" != true ]]; then
if [[ "${have_secrets:-}" != true ]]; then
have_secrets=false

# GitHub Actions: Secrets are available if we're not running on a fork
Expand Down
21 changes: 20 additions & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,27 @@

set -euo pipefail

# Set default parameters
if [[ -z "${SPM:-}" ]]; then
SPM=false
echo "Defaulting to SPM=$SPM"
if [[ -z "${LEGACY:-}" ]]; then
LEGACY=false
echo "Defaulting to LEGACY=$LEGACY"
fi
fi
if [[ -z "${OS:-}" ]]; then
OS=iOS
DEVICE="iPhone 11"
echo "Defaulting to OS=$OS"
echo "Defaulting to DEVICE=$DEVICE"
fi
if [[ -z "${TEST:-}" ]]; then
TEST=true
echo "Defaulting to TEST=$TEST"
fi

# Set have_secrets to true or false.
have_secrets=false
source scripts/check_secrets.sh

# Get Xcode version
Expand Down