File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -104,10 +104,14 @@ namespace :automation do
104104 files . each do |file |
105105 content = File . read ( file )
106106 if file == '.buildkite/pipeline.yml'
107+ require 'yaml'
108+ yaml = YAML . safe_load ( content )
107109 branch = version . match ( /([0-9]+\. [0-9]+)\. [0-9]+.*/ ) [ 1 ]
108- old_branch = content . match ( /ES_YAML_TESTS_BRANCH: ([0-9.]+)/ ) [ 1 ]
109- content . gsub! ( old_branch , branch )
110- puts "[#{ old_branch } ] -> [#{ branch } ] in #{ file . gsub ( './' , '' ) } "
110+ yaml_tests_branch = yaml [ 'steps' ] [ 1 ] [ 'env' ] [ 'ES_YAML_TESTS_BRANCH' ]
111+ next if yaml_tests_branch == 'main'
112+
113+ content . gsub! ( yaml_tests_branch , branch )
114+ puts "[#{ yaml_tests_branch } ] -> [#{ branch } ] in #{ file . gsub ( './' , '' ) } "
111115 end
112116 match = content . match ( regexp )
113117 next if match . nil?
You can’t perform that action at this time.
0 commit comments