Sha256: eb41443acfe149526dceddad3dec155adacfd07372f5ad61961a607a136f2e2a

Contents?: true

Size: 476 Bytes

Versions: 1

Compression:

Stored size: 476 Bytes

Contents

require_relative '../utils/command'

# For execute git commands
class GitHelper
    # Download from a specific branch
    def self.clone_from_branch(url, destination, branch)
        Command.execute("git clone --quiet --depth 1 -b #{branch} --single-branch #{url} #{destination}")
    end

    # Get the latest commit hash
    def self.get_latest_commit(directory)
        Dir.chdir(directory) do
            Command.execute("git rev-parse HEAD").strip
        end
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cocoapods-whitelist-0.6.0 lib/cocoapods-allowlist/helpers/git.rb