summaryrefslogtreecommitdiff
path: root/lib/download.rb
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2023-08-18 07:50:18 +0200
committerEugen Wissner <belka@caraus.de>2023-08-18 07:50:18 +0200
commit258604f22d2bc50480aa4eb57778ab96c97cf1c6 (patch)
treed6fb3c1ce16879b191bc7adba91065d8c6cc7976 /lib/download.rb
parentfd649b66f57123aad95861e636299a2d0a5ca6f7 (diff)
downloadslackbuilder-258604f22d2bc50480aa4eb57778ab96c97cf1c6.tar.gz
Support repository directory in the clone function
Diffstat (limited to 'lib/download.rb')
-rw-r--r--lib/download.rb11
1 files changed, 1 insertions, 10 deletions
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