Reimplement the info file printer

This commit is contained in:
2023-08-28 21:05:47 +02:00
parent 2126488066
commit c2b98ba395
9 changed files with 153 additions and 15 deletions

View File

@ -31,16 +31,7 @@ module SlackBuilder
end
def self.download_and_deploy(uri, tarball)
remote_path = tarball[tarball.index('/')..]
if remote_file_exists?(remote_path)
uri = URI hosted_sources(remote_path)
return download(uri, "slackbuilds/#{tarball}").hexdigest
end
checksum = download uri, "slackbuilds/#{tarball}"
sh(*upload_command(tarball, remote_path))
checksum.hexdigest
`./bin/slackbuilder deploy #{uri} #{tarball}`.strip
end
private_class_method def self.upload_command(local_path, remote_path)