-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathRepeatForUpdatedBuild
executable file
·90 lines (79 loc) · 2.4 KB
/
RepeatForUpdatedBuild
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
# parse arguments
while getopts "hqt:i:s:" opt; do
case "$opt" in
h)
echo "usage:"
echo " -h: help"
echo " -q: quiet mode – skip confirmations, delete icon images clutter"
echo " -t target: Build target – one of(dev|appstore|installer|zip)"
echo " -i identity: Developer or team name and id (in quotes)"
echo " e.g. 'TEAM NAME (XXXXXXXXXX)' or 'YOUR NAME (XXXXXXXXXX)'"
echo " -s signmode: Codesign with --deep? One of (deep|shallow)"
echo
echo " Example: RepeatForUpdatedBuild -q -t appstore -i 'TEAM NAME (XXXXXXXXXX)' -s deep"
echo
exit 0
;;
q)
QUIET=1
QUIET_OPT="-q"
OVERWRITE_OPT="-f"
;;
t)
BUILD_TARGET=$OPTARG
;;
i)
IDENTITY=$OPTARG
;;
s)
SIGN_MODE=$OPTARG
;;
esac
done
echo $TARGET_OPT $IDENTITY_OPT
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
SCRIPT_1="2_Icons/OSX Icon"
SCRIPT_2="3_DeleteMeta/Delete Meta Files"
SCRIPT_3="4_InfoPlist/CopyPlist"
SCRIPT_3A="4_InfoPlist/PluginsReplaceBundleId"
SCRIPT_4="6_SignAndPackage/SignAndPackage"
# skip confirmation if the quiet option is supplied
if [ "$QUIET" = 1 ]; then
cont="y"
else
echo " "
echo "+-----------------------------------------------------------------------------+"
echo "| UPDATE YOUR BUILD WITH CURRENT VALUES ? |"
echo "+-----------------------------------------------------------------------------+"
echo " "
echo "Use this if you have to repeat the process or put everything where it's supposed to. If you are note sure check the readme"
echo " "
printf '\e[1m'
echo -e "\033[5mDO NOT RUN IF YOU HAVE NOT FINISHED THE STEPS\033[0m"
printf '\e[1miCloud requires more steps, please read the readme\n\n'
echo "Continue? (y/n)"
read -r cont
fi
while true
do
if [ "$cont" = "y" ]; then
printf '\e[0m'
bash "$SCRIPT_1" $QUIET_OPT
bash "$SCRIPT_2"
bash "$SCRIPT_3"
bash "$SCRIPT_3A" $QUIET_OPT
bash "$SCRIPT_4" $OVERWRITE_OPT -t "$BUILD_TARGET" -i "$IDENTITY" -s "$SIGN_MODE"
break
elif [ "$cont" = "n" ]; then
exit 0
break
else
echo "Wrong input"
read -r cont
fi
done
# echo "All set"
echo " "
exit 0