d-tools: Migrate source downloads with git clone

This commit is contained in:
Eugen Wissner 2023-10-28 21:24:21 +02:00
parent f51a0418ff
commit 396a536b3a
3 changed files with 17 additions and 6 deletions

View File

@ -23,6 +23,7 @@ import SlackBuilder.Download
import SlackBuilder.Package (Package(..))
import qualified SlackBuilder.Package as Package
import Text.URI (URI(..), mkURI)
import Text.URI.QQ (uri)
import Crypto.Hash (Digest, MD5)
import Data.Foldable (for_, find)
import qualified Text.URI as URI
@ -231,11 +232,21 @@ autoUpdatable =
, name = "d-tools"
, downloaders =
let dubArguments = GhArguments{ owner = "dlang", name = "dub", transform = Nothing}
dscannerArguments = GhArguments{ owner = "dlang-community", name = "D-Scanner", transform = Nothing }
dcdArguments = GhArguments{ owner = "dlang-community", name = "DCD", transform = Nothing }
latestDub = latestGitHub dubArguments pure
latestDscanner = latestGitHub dscannerArguments pure
latestDcd = latestGitHub dcdArguments pure
dubTemplate = Package.DownloadTemplate
$ Package.StaticPlaceholder "https://codeload.github.com/dlang/dub/tar.gz/v"
:| [Package.VersionPlaceholder]
in [Package.Updater latestDub $ downloadWithTemplate dubTemplate]
dscannerURI = [uri|https://github.com/dlang-community/D-Scanner.git|]
dcdURI = [uri|https://github.com/dlang-community/DCD.git|]
in
[ Package.Updater latestDub $ downloadWithTemplate dubTemplate
, Package.Updater latestDscanner $ cloneFromGit dscannerURI "v"
, Package.Updater latestDcd $ cloneFromGit dcdURI "v"
]
}
]

View File

@ -27,6 +27,7 @@ common dependencies
memory ^>= 0.18,
parser-combinators ^>= 1.3,
process ^>= 1.6.18,
req ^>= 3.13,
text ^>= 2.0,
tomland ^>= 1.3.3,
transformers ^>= 0.5.6,
@ -49,12 +50,15 @@ library
import: dependencies
exposed-modules:
SlackBuilder.Config
SlackBuilder.Download
SlackBuilder.Info
SlackBuilder.Package
SlackBuilder.Trans
hs-source-dirs: lib
build-depends:
exceptions >= 0.10
conduit ^>= 1.3.5,
exceptions >= 0.10,
http-client ^>= 0.7
ghc-options: -Wall
@ -64,15 +68,11 @@ executable slackbuilder
other-modules:
SlackBuilder.CommandLine
SlackBuilder.Download
SlackBuilder.Updater
build-depends:
aeson ^>= 2.2.0,
ansi-terminal ^>= 1.0,
conduit ^>= 1.3.5,
http-client ^>= 0.7,
optparse-applicative ^>= 0.18.1,
req ^>= 3.13,
slackbuilder,
unordered-containers ^>= 0.2.19,
vector ^>= 0.13.0