-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate3rd.sh
More file actions
executable file
·69 lines (50 loc) · 1.64 KB
/
update3rd.sh
File metadata and controls
executable file
·69 lines (50 loc) · 1.64 KB
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
#!/bin/bash
# first get last
rm -Rf ~/Library/Caches/org.carthage.CarthageKit/dependencies/QMobile*
# rm -f Cartfile.resolved
file=Cartfile.resolved
url=https://gitlab-4d.private.4d.fr/4d/qmobile/ios/
if [ -f $file ]; then
echo "- before:"
cat $file
sed -i '' '/QMobile/d' $file
for f in ../QMobile*; do
if [[ -d $f ]]; then
hash=`git -C $f rev-parse HEAD`
f="$(basename $f)"
if grep -q $f "Cartfile"; then
line="git \"$url$f.git\" \"$hash\""
echo "$line" >> "$file"
fi
fi
done
echo "- after:"
cat $file
else
echo "No $file. Try a carthage update before to create the file."
exit 1
fi
# checkout
carthage checkout
# Remove Reactivate extension from Moya
## Sources
rm -Rf Carthage/Checkouts/Reactive*
rm -Rf Carthage/Checkouts/Rx*
## Build artifact
rm -Rf Carthage/Build/Reactive*
rm -Rf Carthage/Build/Rx*
## Build scheme
rm -Rf Carthage/Checkouts/Moya/Moya.xcodeproj/xcshareddata/xcschemes/Reactive*
rm -Rf Carthage/Checkouts/Moya/Moya.xcodeproj/xcshareddata/xcschemes/Rx*
## In Cartfile (mandatory or carthage will try to compile or resolve dependencies)
sed -i '' '/Reactive/d' Cartfile.resolved
sed -i '' '/Rx/d' Cartfile.resolved
sed -i '' '/Reactive/d' Carthage/Checkouts/Moya/Cartfile.resolved
sed -i '' '/Rx/d' Carthage/Checkouts/Moya/Cartfile.resolved
sed -i '' '/Reactive/d' Carthage/Checkouts/Moya/Cartfile
sed -i '' '/Rx/d' Carthage/Checkouts/Moya/Cartfile
# build
mkdir -p "build"
carthage build --no-use-binaries --platform iOS --cache-builds --log-path "build/log"
# https://github.com/Carthage/Carthage/issues/1986?
cat "build/log" | xcpretty