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:
authorMarcel Amirault <mamirault@gitlab.com>2022-09-20 12:20:57 +0300
committerMarcel Amirault <mamirault@gitlab.com>2022-09-20 12:20:57 +0300
commit874233c87dff38008126f4fcd81fa67b5c737c1a (patch)
tree9739e4a18d49c2bc91e64468c215a8796f9097fb
parent2f9cacbaa51e3450fac6bfe226a614832b421011 (diff)
parentf240e5219808779c3601101b23b46efbc7a9b024 (diff)
Merge branch 'eread/fix-path-problems-for-rake-task' into 'main'
Don't run commands relative to Rake task location See merge request https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/3114 Merged-by: Marcel Amirault <mamirault@gitlab.com> Approved-by: Kati Paizee <kpaizee@gitlab.com> Approved-by: Marcel Amirault <mamirault@gitlab.com> Co-authored-by: Evan Read <eread@gitlab.com>
-rw-r--r--lib/tasks/release.rake5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/tasks/release.rake b/lib/tasks/release.rake
index 0be8ab1f..65aa0b4d 100644
--- a/lib/tasks/release.rake
+++ b/lib/tasks/release.rake
@@ -10,7 +10,6 @@ namespace :release do
desc 'Creates a single release archive'
task :single, :version do |t, args|
version = args.version.to_s
- source_dir = File.expand_path(__dir__)
# Disable lefthook because it was causing some PATH errors
# https://docs.gitlab.com/ee/development/contributing/style_guides.html#disable-lefthook-temporarily
@@ -35,7 +34,7 @@ namespace :release do
`git checkout -b #{version}`
# Replace the branches variables in Dockerfile.X.Y
- dockerfile = "#{source_dir}/#{version}.Dockerfile"
+ dockerfile = "#{version}.Dockerfile"
if File.exist?(dockerfile)
abort('rake aborted!') if ask("#{dockerfile} already exists. Do you want to overwrite?", %w[y n]) == 'n'
@@ -51,7 +50,7 @@ namespace :release do
end
# Replace the branches variables in .gitlab-ci.yml
- ci_yaml = "#{source_dir}/.gitlab-ci.yml"
+ ci_yaml = ".gitlab-ci.yml"
ci_yaml_content = File.read(ci_yaml)
ci_yaml_content.gsub!("BRANCH_EE: 'master'", "BRANCH_EE: '#{version.tr('.', '-')}-stable-ee'")
ci_yaml_content.gsub!("BRANCH_OMNIBUS: 'master'", "BRANCH_OMNIBUS: '#{version.tr('.', '-')}-stable'")