Skip to content

Commit 3decbdb

Browse files
wing328michaelpro1
authored andcommitted
Fix SSL setting in checkout script (OpenAPITools#5725)
* fix ssl setting in checkout script * add check for sbt-openapi-generator
1 parent 7d06241 commit 3decbdb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

bin/utils/release_checkout.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@
66
require 'open-uri'
77
require 'net/http'
88

9+
def check_sbt_openapi_generator
10+
print "Checking sbt-openapi-generator... "
11+
12+
url = "https://raw.githubusercontent.com/upstart-commerce/sbt-openapi-generator/master/build.sbt"
13+
open(url) do |f|
14+
content = f.read
15+
if !content.nil? && content.include?($version)
16+
puts "[OK]"
17+
else
18+
puts "[ERROR]"
19+
puts "> #{url} not yet updated with #{$version}"
20+
end
21+
end
22+
end
23+
924
def check_npmjs
1025
print "Checking npmjs... "
1126

@@ -180,6 +195,7 @@ def check_url url
180195
content = Net::HTTP.get(URI.parse(url))
181196
url = URI.parse(url)
182197
req = Net::HTTP.new(url.host, url.port)
198+
req.use_ssl = true
183199
res = req.request_head(url.path)
184200
if res.code == "200"
185201
true
@@ -203,6 +219,7 @@ def usage
203219

204220
puts "Running checkout on OpenAPI Generator release #{$version}"
205221

222+
check_sbt_openapi_generator
206223
check_openapi_generator_online_docker
207224
check_openapi_generator_cli_docker
208225
check_npmjs

0 commit comments

Comments
 (0)