Sha256: 106ee3b38ecf129f25a8d9e93b8e16d82d03392b637257ab5675ff9af21860b5
Contents?: true
Size: 936 Bytes
Versions: 95
Compression:
Stored size: 936 Bytes
Contents
class KuberKit::ArtifactsSync::GitArtifactResolver < KuberKit::ArtifactsSync::AbstractArtifactResolver include KuberKit::Import[ "shell.git_commands", ] Contract KuberKit::Shell::AbstractShell, KuberKit::Core::Artifacts::Git => Any def resolve(shell, artifact) already_cloned = artifact_already_cloned?( shell: shell, target_path: artifact.cloned_path, remote_url: artifact.remote_url, ) 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 private def artifact_already_cloned?(shell:, target_path:, remote_url:) target_remote_url = git_commands.get_remote_url(shell, target_path) target_remote_url == remote_url end end
Version data entries
95 entries across 95 versions & 1 rubygems