Sha256: 12c7d9cadce1363a3012098335d35bdd05fe3aea0cb85664fa25b698ef65c8c9
Contents?: true
Size: 850 Bytes
Versions: 6
Compression:
Stored size: 850 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 tag on all local git repos." opt :tag, "The tag to destroy", :type => :string, :required => true MultiRepo::CLI.common_options(self, :except => :dry_run) end require "stringio" post_review = StringIO.new MultiRepo::CLI.each_repo(**opts) do |repo| unless repo.git.tag?(opts[:tag]) puts "!! Skipping because #{opts[:tag]} tag doesn't exist".yellow next end repo.git.client.tag("-d", opts[:tag]) post_review.puts("pushd #{repo.path} && git push origin :#{opts[:tag]} && popd") end puts puts "Run the following script to delete '#{opts[:tag]}' tag from all remote repos" puts puts post_review.string
Version data entries
6 entries across 6 versions & 1 rubygems