forked from NWACus/avy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eas_build_and_submit.sh
executable file
·42 lines (37 loc) · 1016 Bytes
/
eas_build_and_submit.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
if [[ -z "${IOS_USER_ID:-}" ]]; then
echo "[ERROR] \$IOS_USER_ID is required."
exit 1
fi
if [[ -z "${IOS_TEAM_ID:-}" ]]; then
echo "[ERROR] \$IOS_TEAM_ID is required."
exit 1
fi
if [[ -z "${IOS_APP_ID:-}" ]]; then
echo "[ERROR] \$IOS_APP_ID is required."
exit 1
fi
if [[ -z "${PROFILE:-}" ]]; then
echo "[ERROR] \$PROFILE is required."
exit 1
fi
if [[ -z "${PLATFORM:-}" ]]; then
echo "[ERROR] \$PLATFORM is required."
exit 1
fi
function cleanup() {
mv eas.json.tmpl eas.json
}
trap cleanup EXIT
mv eas.json eas.json.tmpl
jq < eas.json.tmpl > eas.json \
--arg IOS_USER_ID "${IOS_USER_ID}" \
--arg IOS_TEAM_ID "${IOS_TEAM_ID}" \
--arg IOS_APP_ID "${IOS_APP_ID}" \
'.submit.release.ios={appleId:$IOS_USER_ID,appleTeamId:$IOS_TEAM_ID,ascAppId:$IOS_APP_ID} | .submit.preview.ios=.submit.release.ios'
set -o xtrace
eas build --non-interactive --platform "${PLATFORM}" --profile "${PROFILE}" --auto-submit
set +o xtrace