diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2022-08-25 09:07:50 +0300 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2022-08-25 09:07:50 +0300 |
commit | ba80807b4251f86c2595b5f1443904a3a50041fb (patch) | |
tree | 2c659e24b972e3247705860c14190d282bb161f3 /lib/tasks/release.rake | |
parent | 2d0daaaa361cc224e2c4676929d839cdf861865a (diff) |
Prefix color codes with TaskHelpers
Diffstat (limited to 'lib/tasks/release.rake')
-rw-r--r-- | lib/tasks/release.rake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tasks/release.rake b/lib/tasks/release.rake index 0d629503..0be8ab1f 100644 --- a/lib/tasks/release.rake +++ b/lib/tasks/release.rake @@ -19,12 +19,12 @@ namespace :release do raise 'You need to specify a version, like 10.1' unless version.match?(%r{\A\d+\.\d+\z}) # Check if local branch exists - abort("\n#{COLOR_CODE_RED}ERROR: Rake aborted! The branch already exists. Delete it with `git branch -D #{version}` and rerun the task.#{COLOR_CODE_RESET}") \ + abort("\n#{TaskHelpers::COLOR_CODE_RED}ERROR: Rake aborted! The branch already exists. Delete it with `git branch -D #{version}` and rerun the task.#{TaskHelpers::COLOR_CODE_RESET}") \ if task_helpers.local_branch_exist?(version) # Stash modified and untracked files so we have "clean" environment # without accidentally deleting data - puts "\n#{COLOR_CODE_GREEN}INFO: Stashing changes..#{COLOR_CODE_RESET}" + puts "\n#{TaskHelpers::COLOR_CODE_GREEN}INFO: Stashing changes..#{TaskHelpers::COLOR_CODE_RESET}" `git stash -u` if task_helpers.git_workdir_dirty? # Sync with upstream default branch @@ -66,8 +66,8 @@ namespace :release do `git add .gitlab-ci.yml #{version}.Dockerfile` `git commit -m 'Release cut #{version}'` - puts "\n#{COLOR_CODE_GREEN}INFO: Created new Dockerfile:#{COLOR_CODE_RESET} #{dockerfile}." - puts "#{COLOR_CODE_GREEN}INFO: Pushing the new branch. Don't create a merge request!#{COLOR_CODE_RESET}" + puts "\n#{TaskHelpers::COLOR_CODE_GREEN}INFO: Created new Dockerfile:#{TaskHelpers::COLOR_CODE_RESET} #{dockerfile}." + puts "#{TaskHelpers::COLOR_CODE_GREEN}INFO: Pushing the new branch. Don't create a merge request!#{TaskHelpers::COLOR_CODE_RESET}" `git push origin #{version}` end |