File tree Expand file tree Collapse file tree 4 files changed +12
-18
lines changed Expand file tree Collapse file tree 4 files changed +12
-18
lines changed Original file line number Diff line number Diff line change @@ -63,14 +63,8 @@ case $CMD in
63
63
TASK_ARGS=(" $VERSION " " $output_folder " )
64
64
;;
65
65
codegen)
66
- if [ -v $VERSION ]; then
67
- echo -e " \033[31;1mTARGET: codegen -> missing version parameter\033[0m"
68
- exit 1
69
- fi
70
- echo -e " \033[36;1mTARGET: codegen API v$VERSION \033[0m"
71
66
TASK=codegen
72
- # VERSION is BRANCH here for now
73
- TASK_ARGS=(" $VERSION " " $codegen_folder " )
67
+ TASK_ARGS=()
74
68
;;
75
69
docsgen)
76
70
if [ -v $VERSION ]; then
@@ -154,10 +148,6 @@ if [[ "$CMD" == "assemble" ]]; then
154
148
fi
155
149
fi
156
150
157
- if [[ " $CMD " == " codegen" ]]; then
158
- echo " TODO"
159
- fi
160
-
161
151
if [[ " $CMD " == " docsgen" ]]; then
162
152
echo " TODO"
163
153
fi
Original file line number Diff line number Diff line change @@ -130,8 +130,3 @@ task :release do
130
130
puts '-' * 80
131
131
end
132
132
end
133
-
134
- desc 'Generate API code'
135
- task :generate do
136
- sh "cd #{ CURRENT_PATH . join ( 'elasticsearch-api/utils' ) } && bundle exec thor code:generate"
137
- end
Original file line number Diff line number Diff line change @@ -82,10 +82,10 @@ namespace :elasticsearch do
82
82
end
83
83
84
84
desc 'Download artifacts (tests and REST spec) for currently running cluster'
85
- task :download_artifacts do
85
+ task :download_artifacts , :version do | _ , args |
86
86
json_filename = CURRENT_PATH . join ( 'tmp/artifacts.json' )
87
87
88
- unless ( version_number = ENV [ 'STACK_VERSION' ] )
88
+ unless ( version_number = args [ :version ] || ENV [ 'STACK_VERSION' ] )
89
89
# Get version number and build hash of running cluster:
90
90
version_number = cluster_info [ 'number' ]
91
91
build_hash = cluster_info [ 'build_hash' ]
Original file line number Diff line number Diff line change @@ -57,6 +57,15 @@ namespace :unified_release do
57
57
"zip -r #{ @zip_filename } .zip * " \
58
58
end
59
59
60
+ desc 'Generate API code'
61
+ task :codegen do
62
+ version = YAML . load_file ( File . expand_path ( __dir__ + '/../.ci/test-matrix.yml' ) ) [ 'STACK_VERSION' ] . first
63
+ Rake ::Task [ 'elasticsearch:download_artifacts' ] . invoke ( version )
64
+ sh "cd #{ CURRENT_PATH . join ( 'elasticsearch-api/utils' ) } \
65
+ && BUNDLE_GEMFILE=`pwd`/Gemfile \
66
+ && bundle exec thor code:generate"
67
+ end
68
+
60
69
desc <<-DESC
61
70
Update Rubygems versions in version.rb and *.gemspec files
62
71
You can’t perform that action at this time.
0 commit comments