forked from loafle/openapi-generator-original
Fix SSL setting in checkout script (#5725)
* fix ssl setting in checkout script * add check for sbt-openapi-generator
This commit is contained in:
parent
bb2112f3de
commit
b49128f04b
@ -6,6 +6,21 @@ require 'rubygems'
|
|||||||
require 'open-uri'
|
require 'open-uri'
|
||||||
require 'net/http'
|
require 'net/http'
|
||||||
|
|
||||||
|
def check_sbt_openapi_generator
|
||||||
|
print "Checking sbt-openapi-generator... "
|
||||||
|
|
||||||
|
url = "https://raw.githubusercontent.com/upstart-commerce/sbt-openapi-generator/master/build.sbt"
|
||||||
|
open(url) do |f|
|
||||||
|
content = f.read
|
||||||
|
if !content.nil? && content.include?($version)
|
||||||
|
puts "[OK]"
|
||||||
|
else
|
||||||
|
puts "[ERROR]"
|
||||||
|
puts "> #{url} not yet updated with #{$version}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def check_npmjs
|
def check_npmjs
|
||||||
print "Checking npmjs... "
|
print "Checking npmjs... "
|
||||||
|
|
||||||
@ -180,6 +195,7 @@ def check_url url
|
|||||||
content = Net::HTTP.get(URI.parse(url))
|
content = Net::HTTP.get(URI.parse(url))
|
||||||
url = URI.parse(url)
|
url = URI.parse(url)
|
||||||
req = Net::HTTP.new(url.host, url.port)
|
req = Net::HTTP.new(url.host, url.port)
|
||||||
|
req.use_ssl = true
|
||||||
res = req.request_head(url.path)
|
res = req.request_head(url.path)
|
||||||
if res.code == "200"
|
if res.code == "200"
|
||||||
true
|
true
|
||||||
@ -203,6 +219,7 @@ $version = ARGV[0]
|
|||||||
|
|
||||||
puts "Running checkout on OpenAPI Generator release #{$version}"
|
puts "Running checkout on OpenAPI Generator release #{$version}"
|
||||||
|
|
||||||
|
check_sbt_openapi_generator
|
||||||
check_openapi_generator_online_docker
|
check_openapi_generator_online_docker
|
||||||
check_openapi_generator_cli_docker
|
check_openapi_generator_cli_docker
|
||||||
check_npmjs
|
check_npmjs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user