-
Notifications
You must be signed in to change notification settings - Fork 17
/
podpub.sh
executable file
·49 lines (43 loc) · 1.07 KB
/
podpub.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
#!/usr/bin/env bash
shopt -s nullglob
set -e
declare -a PODSPECS=(RollbarCommon RollbarCrashReport RollbarNotifier RollbarSwift RollbarDeploys RollbarAUL RollbarCocoaLumberjack)
declare -a OPTIONS=()
function help {
echo "Usage: $ $0 [-v|--verbose] [--tag <TAG>]"
echo "Options:"
echo " --tag <TAG> Tag with version matching podspec."
echo " -v, --verbose Show more debugging information."
echo " --help Print help information."
}
while [ $# -gt 0 ]; do
case $1 in
-v|--verbose|--allow-warnings)
OPTIONS+=($1)
shift
;;
--tag)
TAG=$2
shift 2
;;
--help)
help
exit 1
;;
*)
break
;;
esac
done
if [ -z ${TAG:=$(git tag --points-at HEAD)} ]; then
echo "WARN: Couldn't figure out git tag, only lint is available."
for PODSPEC in ${PODSPECS[@]}; do
pod spec lint $(IFS=$' '; echo ${OPTIONS[*]}) $PODSPEC.podspec
done
else
for PODSPEC in ${PODSPECS[@]}; do
pod trunk push $(IFS=$' '; echo ${OPTIONS[*]}) $PODSPEC.podspec
pod repo update
done
fi
exit 0