OLD | NEW |
| (Empty) |
1 #!/bin/sh | |
2 | |
3 # CircleCI Carthage build caching, per idea at | |
4 # https://robots.thoughtbot.com/caching-carthage-con-circleci | |
5 # | |
6 # Cartfile.resolved is a checksum of successful "carthage checkout" or "carthage
bootstrap" | |
7 # It is recommended to commit in repo. On the other hand, it is NOT recommended
to commit | |
8 # the checkout folder Carthage/ much the same way as Pods/ or node_modules/. How
ever, there is | |
9 # no problem with having the folder CACHED, which means that it persists on CCI
side. | |
10 # So if it's desirable to update it only as needed: | |
11 # 0. cache Carthage/ subdir on CCI side | |
12 # 1. compare the commited latest Cartfile.resolved with a copy under Carthage/ | |
13 # 2. if not equal, redo checkout and build (i.e. bootstrap) | |
14 # 3. replace Cartfile.resolved in Carthage/ | |
15 # | |
16 if ! cmp -s Cartfile.resolved Carthage/Cartfile.resolved; then | |
17 carthage bootstrap --platform iOS --toolchain com.apple.dt.toolchain.XcodeDefa
ult --no-use-binaries | |
18 cp Cartfile.resolved Carthage | |
19 else | |
20 echo "Cartfile.resolved up to date, bootstrap not needed" | |
21 fi | |
OLD | NEW |