From 258604f22d2bc50480aa4eb57778ab96c97cf1c6 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 18 Aug 2023 07:50:18 +0200 Subject: Support repository directory in the clone function --- lib/download.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'lib/download.rb') diff --git a/lib/download.rb b/lib/download.rb index 1d48e68..9b962b0 100644 --- a/lib/download.rb +++ b/lib/download.rb @@ -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 -- cgit v1.2.3