File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -107,11 +107,16 @@ namespace :automation do
107107 if file == '.buildkite/pipeline.yml'
108108 require 'yaml'
109109 yaml = YAML . safe_load ( content )
110- branch = version . match ( /([0-9]+\. [0-9]+)\. [0-9]+.*/ ) [ 1 ]
111110 yaml_tests_branch = yaml [ 'steps' ] [ 0 ] [ 'env' ] [ 'ES_YAML_TESTS_BRANCH' ]
112- next if yaml_tests_branch == 'main'
113111
114- content . gsub! ( yaml_tests_branch , branch )
112+ if yaml_tests_branch == 'main'
113+ old = content . match ( /STACK_VERSION: (.*)/ ) [ 1 ]
114+ new = "STACK_VERSION: #{ version } "
115+ content . gsub! ( new , old )
116+ else
117+ branch = version . match ( /([0-9]+\. [0-9]+)\. [0-9]+.*/ ) [ 1 ]
118+ content . gsub! ( yaml_tests_branch , branch )
119+ end
115120 puts "[#{ yaml_tests_branch } ] -> [#{ branch } ] in #{ file . gsub ( './' , '' ) } "
116121 end
117122 match = content . match ( regexp )
You can’t perform that action at this time.
0 commit comments