Add hhvm subtasks

This commit is contained in:
2022-06-17 22:49:30 +02:00
parent d349a90636
commit bdb3b929fb
4 changed files with 92 additions and 0 deletions

View File

@ -7,6 +7,26 @@
require_relative '../config/config'
require_relative 'package'
require 'net/http'
require 'pathname'
module SlackBuilder
extend Rake::FileUtilsExt
def self.clone(repo, package, tag_prefix = 'v')
repository = Pathname.new('pkg') + package.name_version
if repository.directory?
sh 'git', '-C', repository.to_path, 'remote', 'update', '--prune'
else
sh 'git', 'clone', repo, repository.to_path
end
sh 'git', '-C', repository.to_path, 'checkout', "#{tag_prefix}#{package.version}"
sh 'git', '-C', repository.to_path, 'submodule', 'update', '--init', '--recursive'
repository
end
end
def write_download(target, response)
checksum = Digest::MD5.new

View File

@ -17,6 +17,10 @@ class Package
def name
File.basename @path
end
def name_version
"#{name}-#{@version}"
end
end
class Download