Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Read <eread@gitlab.com>2022-06-10 04:15:49 +0300
committerEvan Read <eread@gitlab.com>2022-06-10 04:24:05 +0300
commit95ecd4954ea689149d9a610aca5986bb500339b6 (patch)
tree270b010fd5bc210239b752d13d77511bd27c0285 /Rakefile
parentaf999a0769cb4f3e405b5a212ce5cadbdc31c5e6 (diff)
Fix Style/IfUnlessModifier RuboCop offenseseread/fix-if-unless-modifier-rubocop-offenses
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile8
1 files changed, 2 insertions, 6 deletions
diff --git a/Rakefile b/Rakefile
index 1f4f77b7..d005b152 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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|