-
Notifications
You must be signed in to change notification settings - Fork 1
/
renetik_ios_functions.sh
executable file
·38 lines (38 loc) · 1.03 KB
/
renetik_ios_functions.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
#!/bin/sh
TAG="Renetik iOS:"
pullBuildDocsCommitPushModule() {
PROJECT=$1
SCHEME=$2
echo "$TAG PullBuildDocsCommitPush of module $PROJECT"
cd $PROJECT
git push --verbose
git pull --verbose
if ! xcodebuild clean build analyze -scheme $SCHEME -sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 11'; then
exit
fi
releaseDoc $PROJECT $SCHEME
commitPush "..."
cd ..
}
releaseDoc() {
PROJECT=$1
SCHEME=$2
echo "$TAG Releasing documentation for project:$PROJECT scheme:$SCHEME"
jazzy \
--clean \
--author Renetik \
--author_url https://renetik.github.io \
--source-host github \
--source-host-url https://github.com/renetik/$PROJECT \
--module $SCHEME \
--swift-build-tool xcodebuild --build-tool-arguments \
-scheme,$SCHEME,-sdk,iphonesimulator,-destination,"name=iPhone 12"
git add --all docs
}
commitPush() {
MESSAGE=$1
echo "$TAG Commit push with message:$MESSAGE"
git commit -a -m "$MESSAGE" --verbose
git push --verbose
}