Skip to content

Commit

Permalink
Better update mechanism for manageiq-style
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryguy committed Jul 1, 2024
1 parent 12aaaba commit fd6a680
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions scripts/pull_request_blaster_outer/manageiq-style.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
#! /usr/bin/env ruby

require 'bundler/setup'
require 'manageiq-style'
require 'bundler/inline'
gemfile do
gem 'manageiq-style', '>=1.5.0', :path => File.expand_path("~/dev/manageiq-style")
gem 'multi_repo', '>=0.3.1'
gem 'colorize'
end

ManageIQ::Style::CLI.new(:install => true).run
gemfile = Dir.glob("Gemfile").first
gemfile_ref = gemfile && File.read(gemfile).include?("manageiq-style")
gemspec = Dir.glob("*.gemspec").first
gemspec_ref = gemspec && File.read(gemspec).include?("manageiq-style")

if File.exist?(".codeclimate.yml") && (gemfile_ref || gemspec_ref)
ManageIQ::Style::CLI.new(:install => true, :yamllint => false, :hamllint => false).run
else
puts "!! Skipping since .codeclimate.yml was not found".light_yellow
end

0 comments on commit fd6a680

Please sign in to comment.