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>2019-02-21 12:10:24 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2019-02-21 12:10:24 +0300
commit152576e904ce7f625eff2925b57c2f6cd2242912 (patch)
treedcdf42e63c4f4b9c8ee5fe599b7726352c31c76f /Rakefile
parentb329fef297cacd6a8499e057bb3f04b0db1c0d3c (diff)
Implement version mapping between GitLab and the charts
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Rakefile b/Rakefile
index bbc4ecff..b4745466 100644
--- a/Rakefile
+++ b/Rakefile
@@ -109,6 +109,7 @@ namespace :release do
# Stash modified and untracked files so we have "clean" environment
# without accidentally deleting data
+ puts "Stashing changes"
`git stash -u` if git_workdir_dirty?
# Sync with upstream master
@@ -116,8 +117,7 @@ namespace :release do
`git pull origin master`
# Create branch
- `git branch #{version}`
- `git checkout #{version}`
+ `git checkout -b #{version}`
dockerfile = "#{source_dir}/Dockerfile.#{version}"
@@ -128,22 +128,23 @@ namespace :release do
content = File.read('dockerfiles/Dockerfile.single')
content.gsub!('X.Y', version)
content.gsub!('X-Y', version.tr('.', '-'))
+ content.gsub!('W-Z', chart_version(version).tr('.', '-'))
open(dockerfile, 'w') do |post|
post.puts content
end
+ # Add and commit
+ `git add Dockerfile.#{version}`
+ `git commit -m 'Add #{version} Dockerfile'`
+
puts
puts "--------------------------------"
puts
puts "=> Created new Dockerfile: #{dockerfile}"
puts
- puts "!! Make sure to change the charts branch in Dockerfile.#{version} !!"
- puts
puts "=> You can now add, commit and push the new branch:"
puts
- puts " git add Dockerfile.#{version}"
- puts " git commit -m 'Add #{version} Dockerfile'"
puts " git push origin #{version}"
puts
puts "--------------------------------"