Remove pods repo if lock file exists

This commit is contained in:
Alexey Gerasimov 2017-11-13 10:43:45 +03:00
parent 163c261136
commit 3d4177a85f
1 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,14 @@
$appName = File.basename(Dir['../*.xcworkspace'].first, '.*')
before_all do |lane, options|
podsReposPath = "/Users/builder/.cocoapods/repos/master/"
lockFilePath = "#{podsReposPath}.git/index.lock"
# check if .lock file exists in pod repos - then remove all master repo
if File.exists? lockFilePath
sh("rm -rf #{podsReposPath}")
end
cocoapods(
clean: true,
repo_update: true