Skip to content

Commit 4a39126

Browse files
committed
[CI] Updates download artifacts to remove dir before extracting
1 parent 4b0d70e commit 4a39126

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rake_tasks/elasticsearch_tasks.rake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ namespace :elasticsearch do
5555
json_filename = CURRENT_PATH.join('tmp/artifacts.json')
5656

5757
# Get version number and build hash of running cluster:
58-
es_info = cluster_info
5958
version_number = cluster_info['number']
6059
build_hash = cluster_info['build_hash']
6160

@@ -74,6 +73,9 @@ namespace :elasticsearch do
7473
filename = CURRENT_PATH.join("tmp/#{zip_url.split('/').last}")
7574
download_file!(zip_url, filename)
7675

76+
spec = CURRENT_PATH.join('tmp/rest-api-spec')
77+
FileUtils.remove_dir(spec) if File.directory?(spec)
78+
7779
puts "Unzipping file #{filename}"
7880
`unzip -o #{filename} -d tmp/`
7981
`rm #{filename}`

0 commit comments

Comments
 (0)