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:
authorAchilleas Pipinellis <axil@gitlab.com>2020-04-22 14:39:17 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2020-04-22 14:39:17 +0300
commit6a0cf8733b360f2249565b875c76e997963122b4 (patch)
tree94fac6ecf8a44a163eecbe0d99e4afdd5fc0c566
parent0d605f7dc8791d1e6ec2b804b5a93c220aec6b5f (diff)
parentf75c3c4170eaee1a4f90d289eae86542245171e3 (diff)
Merge branch 'update-release-task' into 'master'
Fetch changes of the version branches when updating the dropdowns See merge request gitlab-org/gitlab-docs!810
-rw-r--r--Rakefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Rakefile b/Rakefile
index f11c9fb5..210dc932 100644
--- a/Rakefile
+++ b/Rakefile
@@ -189,13 +189,17 @@ namespace :release do
mr_title = "Update #{version} dropdown to match that of #{current_version}"
branch_name = "update-#{version.tr('.', '-')}-for-release-#{current_version.tr('.', '-')}"
- puts "Create a new branch off of the online version"
+ puts "=> Create a new branch off of the online version"
`git checkout -b #{branch_name} #{version}`
- puts "Copy the versions.yaml content from the release-#{current_version} branch"
+ puts "=> Fetch version origin and reset to current"
+ `git fetch origin #{version}`
+ `git reset --hard origin/#{version}`
+
+ puts "=> Copy the versions.yaml content from the release-#{current_version} branch"
`git checkout release-#{current_version.tr('.', '-')} -- content/_data/versions.yaml`
- puts "Commit and push to create a merge request"
+ puts "=> Commit and push to create a merge request"
`git commit -m "Update dropdown to #{current_version}"`
`git push origin #{branch_name} -o merge_request.create -o merge_request.target=#{version} -o merge_request.remove_source_branch -o merge_request.merge_when_pipeline_succeeds -o merge_request.title="#{mr_title}" -o merge_request.label="release"`
end