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
104
104
files . each do |file |
105
105
content = File . read ( file )
106
106
if file == '.buildkite/pipeline.yml'
107
+ require 'yaml'
108
+ yaml = YAML . safe_load ( content )
107
109
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 ( './' , '' ) } "
111
115
end
112
116
match = content . match ( regexp )
113
117
next if match . nil?
You can’t perform that action at this time.
0 commit comments