-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdeployPhy.sh
More file actions
executable file
·50 lines (34 loc) · 1006 Bytes
/
deployPhy.sh
File metadata and controls
executable file
·50 lines (34 loc) · 1006 Bytes
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
#!/bin/sh
framework_version="$1"
podspec_path="PhyKitCocoapod.podspec"
echo "$framework_version"
function updatePodspec {
i_podspec_path="$1"
i_version="$2"
version_string="automaticVersion = '$i_version'"
echo "Updating podspec version to $i_version"
sed -i '' "1s/.*/${version_string}/" "$i_podspec_path"
}
function updateGit {
i_version_tag="$1"
# Stage all changes
git add -A
# Commit and push changes
git commit -e
git push -u origin HEAD
# Delete current version tag from any commits if it exists
# git tag -d "$framework_version"
# git fetch
# git push origin --delete "$framework_version"
# git tag -d "$framework_version"
# Update tag
git tag -fa "$i_version_tag" -m "Automatically updating tag to $i_version_tag"
git push origin "refs/tags/$i_version_tag"
}
function pushPod {
i_podspec_path="$1"
pod trunk push "$i_podspec_path"
}
updatePodspec "$podspec_path" "$framework_version"
updateGit "$framework_version"
pushPod "$podspec_path"