Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rake_tasks/automation.rake
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ namespace :automation do
if file == '.buildkite/pipeline.yml'
require 'yaml'
yaml = YAML.safe_load(content)
yaml_tests_branch = yaml['steps'][0]['env']['ES_YAML_TESTS_BRANCH']
yaml_tests_branch = yaml['steps'][0]['env']['ES_YAML_TESTS_BRANCH'].to_s

if yaml_tests_branch == 'main'
old = content.match(/STACK_VERSION: (.*)/)[1]
new = "STACK_VERSION: #{version}"
content.gsub!(new, old)
else
branch = version.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1]
branch = version.to_s.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1]
content.gsub!(yaml_tests_branch, branch)
end
puts "[#{yaml_tests_branch}] -> [#{branch}] in #{file.gsub('./', '')}"
Expand Down