Move packagist check to a Haskell binary

This commit is contained in:
2023-08-04 21:33:21 +02:00
parent 1bc410d86d
commit 028f64d25a
5 changed files with 93 additions and 7 deletions

View File

@ -77,12 +77,7 @@ module SlackBuilder
end
def latest
full_name = [@vendor, @name].join '/'
uri = URI "https://repo.packagist.org/p2/#{full_name}.json"
response = Net::HTTP.get uri, {
'content-type' => 'application/json'
}
JSON.parse(response)['packages'][full_name].first['version']
`./bin/slackbuilder #{@vendor} #{@name}`.strip
end
end