summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2023-11-04 14:13:59 +0100
committerEugen Wissner <belka@caraus.de>2023-11-04 14:13:59 +0100
commit9770cc8829d6fdacd1ae02e1f78fcf270e5a5503 (patch)
tree7f730f5e0708366f8eb5788acd268636825b88cc /lib
parent0023fe033731180afe8bc2242c2a512b31b8c0bf (diff)
downloadslackbuilder-9770cc8829d6fdacd1ae02e1f78fcf270e5a5503.tar.gz
Remove gem and rake support files
Diffstat (limited to 'lib')
-rw-r--r--lib/SlackBuilder/Download.hs17
-rw-r--r--lib/download.rb40
-rw-r--r--lib/package.rb24
3 files changed, 0 insertions, 81 deletions
diff --git a/lib/SlackBuilder/Download.hs b/lib/SlackBuilder/Download.hs
index 4003afd..7729b0b 100644
--- a/lib/SlackBuilder/Download.hs
+++ b/lib/SlackBuilder/Download.hs
@@ -3,7 +3,6 @@ module SlackBuilder.Download
, cloneAndArchive
, commit
, download
- , downloadAndDeploy
, hostedSources
, remoteFileExists
, updateSlackBuildVersion
@@ -207,19 +206,3 @@ clone repo tarball tagPrefix = do
in cloneAndArchive repo nameVersion tarballPath tagPrefix
>> uploadCommand tarball remotePath
>> liftIO (runConduitRes go) <&> Just
-
-downloadAndDeploy :: Text -> Text -> SlackBuilderT (Maybe (Digest MD5))
-downloadAndDeploy uri tarball = do
- repository' <- SlackBuilderT $ asks repository
- let tarballPath = Text.unpack tarball
- remotePath = Text.pack $ joinPath $ ("/" :) $ drop 1 $ splitPath tarballPath
- localPath = repository' </> tarballPath
- remoteFileExists' <- remoteFileExists remotePath
-
- if remoteFileExists'
- then
- hostedSources remotePath >>= flip download localPath
- else do
- checksum <- liftIO (mkURI uri) >>= flip download localPath
- uploadCommand tarball remotePath
- pure checksum
diff --git a/lib/download.rb b/lib/download.rb
deleted file mode 100644
index 17b119b..0000000
--- a/lib/download.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at https://mozilla.org/MPL/2.0/.
-
-# frozen_string_literal: true
-
-require_relative '../config/config'
-require_relative 'package'
-require 'net/http'
-require 'pathname'
-require 'progressbar'
-require 'term/ansicolor'
-
-module SlackBuilder
- extend Rake::FileUtilsExt
-
- def self.clone(repo, tarball, tag_prefix = 'v')
- `./bin/slackbuilder clone #{repo} #{tarball} #{tag_prefix}`
- end
-
- def self.download(uri, target)
- `./bin/slackbuilder download #{uri} #{target}`.strip
- end
-
- def self.hosted_sources(absolute_url)
- CONFIG[:download_url] + absolute_url
- end
-
- def self.remote_file_exists?(url)
- `./bin/slackbuilder exists #{url}`.strip == 'True'
- end
-
- def self.download_and_deploy(uri, tarball)
- `./bin/slackbuilder deploy #{uri} #{tarball}`.strip
- end
-
- private_class_method def self.upload_command(local_path, remote_path)
- ['scp', "slackbuilds/#{local_path}", CONFIG[:remote_path] + remote_path]
- end
-end
diff --git a/lib/package.rb b/lib/package.rb
deleted file mode 100644
index b5c44bb..0000000
--- a/lib/package.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at https://mozilla.org/MPL/2.0/.
-
-# frozen_string_literal: true
-
-class Package
- attr_reader :path, :version, :homepage, :requires
-
- def initialize(path, version:, homepage:, requires: [])
- @path = path
- @version = version
- @homepage = homepage
- @requires = requires
- end
-
- def name
- File.basename @path
- end
-
- def name_version
- "#{name}-#{@version}"
- end
-end