diff options
author | Evan Read <eread@gitlab.com> | 2022-06-10 04:15:49 +0300 |
---|---|---|
committer | Evan Read <eread@gitlab.com> | 2022-06-10 04:24:05 +0300 |
commit | 95ecd4954ea689149d9a610aca5986bb500339b6 (patch) | |
tree | 270b010fd5bc210239b752d13d77511bd27c0285 | |
parent | af999a0769cb4f3e405b5a212ce5cadbdc31c5e6 (diff) |
Fix Style/IfUnlessModifier RuboCop offenseseread/fix-if-unless-modifier-rubocop-offenses
-rw-r--r-- | Rakefile | 8 | ||||
-rw-r--r-- | commands/frontend.rb | 4 |
2 files changed, 3 insertions, 9 deletions
@@ -136,9 +136,7 @@ namespace :release do desc 'Creates merge requests to update the dropdowns in all online versions' task :dropdowns do # Check if you're on the default branch before starting. Fail if you are. - if `git branch --show-current`.tr("\n", '') == ENV['CI_DEFAULT_BRANCH'] - abort("\n#{COLOR_CODE_RED}ERROR: You are on the default branch. Create the current release branch and run the Rake task again.#{COLOR_CODE_RESET}") - end + abort("\n#{COLOR_CODE_RED}ERROR: You are on the default branch. Create the current release branch and run the Rake task again.#{COLOR_CODE_RESET}") if `git branch --show-current`.tr("\n", '') == ENV['CI_DEFAULT_BRANCH'] # Load online versions versions = YAML.load_file('./content/_data/versions.yaml') @@ -150,9 +148,7 @@ namespace :release do release_branch = "release-#{current_version.tr('.', '-')}" # Check if a release branch has been created, if not fail and warn the user - if `git rev-parse --verify #{release_branch}`.empty? - abort("\n#{COLOR_CODE_RED}ERROR: A release branch for the latest stable version has not been created.#{COLOR_CODE_RESET}") - end + abort("\n#{COLOR_CODE_RED}ERROR: A release branch for the latest stable version has not been created.#{COLOR_CODE_RESET}") if `git rev-parse --verify #{release_branch}`.empty? # Create a merge request to update the dropdowns in all online versions versions['online'].each do |version| diff --git a/commands/frontend.rb b/commands/frontend.rb index 0b669ef3..edc77ae3 100644 --- a/commands/frontend.rb +++ b/commands/frontend.rb @@ -44,8 +44,6 @@ run do |opts, args, cmd| Dir.mkdir gl_ui_dest Dir.children("#{gl_ui_src}").each do |filename| - if filename.include?("css") && File.write("#{gl_ui_dest}/#{filename}", File.read("#{root}/#{gl_ui_src}/#{filename}")) - puts "Copied #{gl_ui_src}/#{filename}" - end + puts "Copied #{gl_ui_src}/#{filename}" if filename.include?("css") && File.write("#{gl_ui_dest}/#{filename}", File.read("#{root}/#{gl_ui_src}/#{filename}")) end end |