9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/kuber_kit/artifacts_sync/strategies/git_updater.rb', line 9
def update(shell, artifact)
already_cloned = artifact_already_cloned?(
shell: shell,
repo_path: artifact.cloned_path,
artifact: artifact
)
if already_cloned
git_commands.force_pull_repo(shell,
path: artifact.cloned_path, branch: artifact.branch
)
else
git_commands.download_repo(shell,
remote_url: artifact.remote_url, path: artifact.cloned_path, branch: artifact.branch
)
end
end
|