Skip to content
Snippets Groups Projects
Commit da94ec49 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis
Browse files

Merge branch 'use-git-pull' into 'master'

Use git pull if the repository exists

Use git pull if the repository exists, this is more error proof and sufficient since the ce and ee repositories are huge.

See merge request !39
parents 7f0ba244 05b39e06
No related branches found
No related tags found
1 merge request!39Use git pull if the repository exists
Loading
Loading
@@ -31,8 +31,12 @@ def main
tmp_dir = File.join('/tmp/gitlab', relative_path)
 
unless 'no-clone' == ARGV[0]
system("rm -rf #{tmp_dir}")
system("git clone #{ENV['PROGRESS'] ? nil : '--quiet'} -- #{clone_url} #{tmp_dir}")
if File.exist?("#{tmp_dir}/.git/config")
system("git -C #{tmp_dir} #{ENV['PROGRESS'] ? nil : '--quiet'} pull")
else
system("rm -rf #{tmp_dir}")
system("git clone #{ENV['PROGRESS'] ? nil : '--quiet'} -- #{clone_url} #{tmp_dir}")
end
end
 
$progress.puts 'Deleting files that should be excluded'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment