Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better update mechanism for manageiq-style #301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
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