Sha256: a9f29782a580eff91298fa443cd38705b4123c119967ab2f6192611e9d7d37cb

Contents?: true

Size: 602 Bytes

Versions: 1

Compression:

Stored size: 602 Bytes

Contents

#!/usr/bin/env ruby

require "bundler/inline"
gemfile do
  source "https://rubygems.org"
  gem "multi_repo", require: "multi_repo/cli", path: File.expand_path("..", __dir__)
end

opts = Optimist.options do
  synopsis "Destroy a remote on all local git repos."

  opt :remote, "The remote to destroy", :type => :string, :required => true

  MultiRepo::CLI.common_options(self)
end

MultiRepo::CLI.each_repo(**opts) do |repo|
  unless repo.git.remote?(opts[:remote])
    puts "!! Skipping because #{opts[:remote]} remote doesn't exist".yellow
    next
  end

  repo.git.destroy_remote(opts[:remote])
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
multi_repo-0.5.0 scripts/destroy_remote