forked from payu-intrepos/payu-upi-ios-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PayUIndia-UPI-Release.sh
62 lines (52 loc) · 1.11 KB
/
PayUIndia-UPI-Release.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
54
55
56
57
58
59
60
61
#!/bin/sh
deleteLocalTag() {
command="git tag -d $1"
echo "Executing ---- ${command}"
eval "$command"
}
deleteRemoteTag() {
command="git push --delete origin $1"
echo "Executing ---- ${command}"
eval "$command"
deleteLocalTag $1
}
createLocalTag() {
command="git tag $1"
echo "Executing ---- ${command}"
eval "$command"
}
createRemoteTag() {
command="git push origin $1"
echo "Executing ---- ${command}"
eval "$command"
if [ $? -eq 0 ]; then
echo "Tag created remotely"
else
echo "Failed to create tag remotely"
deleteLocalTag $1
fi
}
podLibLint() {
command="pod lib lint $1 --allow-warnings --verbose"
echo "Executing ---- ${command}"
eval "$command"
}
podTrunkPush() {
command="pod trunk push $1 --allow-warnings --verbose"
echo "Executing ---- ${command}"
eval "$command"
if [ $? -eq 0 ]; then
echo "Pod trunk successfully"
else
echo "Pod trunk failed"
deleteRemoteTag $2
fi
}
podName="PayUIndia-UPI"
podVersion="7.0.0"
podSpec="${podName}.podspec"
tag="${podName}_${podVersion}"
podLibLint ${podSpec} &&
createLocalTag ${tag} &&
createRemoteTag ${tag} &&
podTrunkPush ${podSpec} ${tag}