-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathci-deploy-fastlane.sh
executable file
·53 lines (40 loc) · 1.08 KB
/
ci-deploy-fastlane.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
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#------------------------------------------------------------------------
# A script to deploy all Fastlane applications.
#
#------------------------------------------------------------------------
# Utility methods
#
fatal()
{
echo "ci-deploy-fastlane.sh: fatal: $1" 1>&2
exit 1
}
info()
{
echo "ci-deploy-fastlane.sh: info: $1" 1>&2
}
#------------------------------------------------------------------------
if [ $# -lt 1 ]
then
fatal "usage: project [project ...]"
fi
PROJECT_LIST="$1"
CI_BIN_DIRECTORY=$(realpath .ci) ||
fatal "could not determine bin directory"
export PATH="${PATH}:${CI_BIN_DIRECTORY}:."
info "deploying ${PROJECT_LIST}"
for PROJECT in ${PROJECT_LIST}
do
info "deploying ${PROJECT}"
ci-deploy-fastlane-install.sh "${PROJECT}"
if [ -f "${PROJECT}/fastlane-aab.conf" ]
then
ci-deploy-fastlane-aab.sh "${PROJECT}" ||
fatal "could not deploy ${PROJECT} AAB to Fastlane"
elif [ -f "${PROJECT}/fastlane-apk.conf" ]
then
ci-deploy-fastlane-apk.sh "${PROJECT}" ||
fatal "could not deploy ${PROJECT} APK to Fastlane"
fi
done