Sha256: 32cc80e70a0cdb4c9e78f546bbb369eb9c4232e1e87dc233bef4c38a690e03fb
Contents?: true
Size: 666 Bytes
Versions: 6
Compression:
Stored size: 666 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 branch on all local git repos." opt :branch, "The branch to destroy.", :type => :string, :required => true MultiRepo::CLI.common_options(self, :except => :dry_run) end MultiRepo::CLI.each_repo(**opts) do |repo| unless repo.git.branch?(opts[:branch]) puts "!! Skipping because #{opts[:branch]} branch doesn't exist".yellow next end repo.git.client.checkout("master") repo.git.client.branch("-D", opts[:branch]) end
Version data entries
6 entries across 6 versions & 1 rubygems