Skip to content

Commit 9e75b3c

Browse files
anton-plebanovichfreak4pc
authored andcommitted
- Removed cache build usage
1 parent 6e45f1d commit 9e75b3c

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

scripts/bootstrap-if-needed.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,32 @@ RED='\033[1;31m'
66
GREEN='\033[1;32m'
77
NC='\033[0m' # No Color
88

9+
checksum_file="Carthage/cartSum.txt"
10+
11+
# Computes current Carthage checksum using 'Cartfile.resolved' file, Swift version and checksum version.
12+
computeChecksum() {
13+
local version="1"
14+
{ cat Cartfile.resolved; xcrun swift -version; echo "${version}" } | md5
15+
}
16+
917
# Get previous checksum
1018
mkdir -p "Carthage"
11-
touch "Carthage/cartSum.txt"
12-
if [ ! -f "Carthage/cartSum.txt" ]; then
19+
touch "${checksum_file}"
20+
if [ ! -f "${checksum_file}" ]; then
1321
prevSum="null";
1422
else
15-
prevSum=`cat Carthage/cartSum.txt`;
23+
prevSum=`computeChecksum`;
1624
fi
1725

1826
# Get checksum
19-
cartSum=`{ cat Cartfile.resolved; xcrun swift -version; } | md5`
27+
cartSum=`computeChecksum`
2028

2129
if [ "$prevSum" != "$cartSum" ] || [ ! -d "Carthage/Build/iOS" ]; then
2230
printf "${RED}Dependencies out of date with cache.${NC} Bootstrapping...\n"
2331
scripts/bootstrap.sh
32+
33+
echo `computeChecksum` > "${checksum_file}"
34+
2435
else
2536
printf "${GREEN}Cache up-to-date.${NC} Skipping bootstrap...\n"
2637
fi

scripts/bootstrap.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,4 @@ applyXcode12Workaround() {
1919
}
2020

2121
applyXcode12Workaround
22-
carthage bootstrap --cache-builds
23-
24-
cartSum=`{ cat Cartfile.resolved; xcrun swift -version; } | md5`
25-
echo $cartSum > Carthage/cartSum.txt
22+
carthage bootstrap

0 commit comments

Comments
 (0)