Further tweaks to CI scripts
This commit is contained in:
parent
00aef6ca97
commit
2341fbf59f
|
@ -23,23 +23,22 @@ local load_cocoapods_cache = {
|
|||
name: 'Load CocoaPods Cache',
|
||||
commands: [
|
||||
|||
|
||||
if [[ ! -f /Users/drone/.cocoapods_cache.valid ]]; then
|
||||
rm -f /Users/drone/.cocoapods_cache.lock
|
||||
fi
|
||||
|||,
|
||||
|||
|
||||
LOOP_BREAK=0
|
||||
while test -e /Users/drone/.cocoapods_cache.lock; do
|
||||
sleep 1
|
||||
LOOP_BREAK=$((LOOP_BREAK + 1))
|
||||
|
||||
if [[ LOOP_BREAK >= 600 ]]; then
|
||||
'rm -f /Users/drone/.cocoapods_cache.lock'
|
||||
fi
|
||||
done
|
||||
|||,
|
||||
'touch /Users/drone/.cocoapods_cache.lock',
|
||||
'rm -f /Users/drone/.cocoapods_cache.valid',
|
||||
|||
|
||||
if [[ -d /Users/drone/.cocoapods_cache ]]; then
|
||||
cp -r /Users/drone/.cocoapods_cache ./Pods
|
||||
fi
|
||||
|||,
|
||||
'touch /Users/drone/.cocoapods_cache.valid',
|
||||
'rm -f /Users/drone/.cocoapods_cache.lock'
|
||||
]
|
||||
};
|
||||
|
@ -49,24 +48,23 @@ local update_cocoapods_cache = {
|
|||
name: 'Update CocoaPods Cache',
|
||||
commands: [
|
||||
|||
|
||||
if [[ ! -f /Users/drone/.cocoapods_cache.valid ]]; then
|
||||
rm -f /Users/drone/.cocoapods_cache.lock
|
||||
fi
|
||||
|||,
|
||||
|||
|
||||
LOOP_BREAK=0
|
||||
while test -e /Users/drone/.cocoapods_cache.lock; do
|
||||
sleep 1
|
||||
LOOP_BREAK=$((LOOP_BREAK + 1))
|
||||
|
||||
if [[ LOOP_BREAK >= 600 ]]; then
|
||||
'rm -f /Users/drone/.cocoapods_cache.lock'
|
||||
fi
|
||||
done
|
||||
|||,
|
||||
'touch /Users/drone/.cocoapods_cache.lock',
|
||||
'rm -f /Users/drone/.cocoapods_cache.valid',
|
||||
|||
|
||||
if [[ -d ./Pods ]]; then
|
||||
rm -rf /Users/drone/.cocoapods_cache
|
||||
cp -r ./Pods /Users/drone/.cocoapods_cache
|
||||
fi
|
||||
|||,
|
||||
'touch /Users/drone/.cocoapods_cache.valid',
|
||||
'rm -f /Users/drone/.cocoapods_cache.lock'
|
||||
]
|
||||
};
|
||||
|
@ -134,7 +132,7 @@ local update_cocoapods_cache = {
|
|||
name: 'Build',
|
||||
commands: [
|
||||
'mkdir build',
|
||||
'xcodebuild archive -workspace Session.xcworkspace -scheme Session -derivedDataPath ./build/derivedData -configuration "App Store Release" -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO'
|
||||
'xcodebuild archive -workspace Session.xcworkspace -scheme Session -derivedDataPath ./build/derivedData -configuration "App Store Release" -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO | ./Pods/xcbeautify/xcbeautify --is-ci'
|
||||
],
|
||||
},
|
||||
update_cocoapods_cache,
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
# Script used with Drone CI to upload build artifacts (because specifying all this in
|
||||
# .drone.jsonnet is too painful).
|
||||
|
||||
|
||||
|
||||
set -o errexit
|
||||
|
||||
if [ -z "$SSH_KEY" ]; then
|
||||
|
@ -35,14 +33,13 @@ prod_path="build/Session.xcarchive"
|
|||
sim_path="build/Session_sim.xcarchive/Products/Applications/Session.app"
|
||||
|
||||
mkdir -p build
|
||||
echo "Test" > "build/test.txt"
|
||||
|
||||
if [ ! -d $prod_path ]; then
|
||||
cp -av $prod_path "$base"
|
||||
else if [ ! -d $sim_path ]; then
|
||||
cp -av $sim_path "$base"
|
||||
else
|
||||
echo "Expected a file to upload, found none" >&2
|
||||
echo -e "\n\n\n\e[31;1mExpected a file to upload, found none\e[0m" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue