Support repository directory in the clone function
This commit is contained in:
@ -109,16 +109,7 @@ module SlackBuilder
|
||||
end
|
||||
|
||||
private_class_method def self.clone_and_archive(repo, name_version, tarball, tag_prefix = 'v')
|
||||
_, _, version = name_version.rpartition '-'
|
||||
|
||||
rm_rf name_version
|
||||
|
||||
sh 'git', 'clone', repo, name_version
|
||||
sh 'git', '-C', name_version, 'checkout', "#{tag_prefix}#{version}"
|
||||
sh 'git', '-C', name_version, 'submodule', 'update', '--init', '--recursive'
|
||||
|
||||
sh 'tar', 'Jcvf', "slackbuilds/#{tarball}", name_version
|
||||
rm_rf name_version
|
||||
sh './bin/slackbuilder', 'archive', repo, name_version, tarball, tag_prefix
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user