universal-ctags: Add version path segment
… to the download URL.
This commit is contained in:
parent
ec704e267b
commit
7c499bd3f7
2
.hlint.yaml
Normal file
2
.hlint.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
arguments:
|
||||
- -XQuasiQuotes
|
@ -39,7 +39,8 @@ autoUpdatable =
|
||||
let ghArguments = GhArguments{ owner = "universal-ctags", name = "ctags", transform = Nothing}
|
||||
latest' = latestGitHub ghArguments pure
|
||||
templateTail =
|
||||
[ Package.StaticPlaceholder "/ctags-"
|
||||
[ Package.VersionPlaceholder
|
||||
, Package.StaticPlaceholder "/ctags-"
|
||||
, Package.VersionPlaceholder
|
||||
, Package.StaticPlaceholder ".tar.gz"
|
||||
]
|
||||
@ -56,8 +57,10 @@ autoUpdatable =
|
||||
up2Date :: SlackBuilderT ()
|
||||
up2Date = for_ autoUpdatable go
|
||||
where
|
||||
go package@Package{ latest = Package.Updater getLatest _ } =
|
||||
getLatest >>= mapM_ (updatePackage package)
|
||||
go package = getAndLogLatest package >>= mapM_ (updatePackage package)
|
||||
getAndLogLatest Package{ latest = Package.Updater getLatest _, name }
|
||||
= liftIO (putStrLn $ Text.unpack name <> ": Retreiving the latest version.")
|
||||
>> getLatest
|
||||
|
||||
updatePackage :: Package -> Text -> SlackBuilderT ()
|
||||
updatePackage Package{..} version = do
|
||||
|
@ -109,7 +109,7 @@ latestPackagist PackagistArguments{..} = do
|
||||
latestText :: TextArguments -> SlackBuilderT (Maybe Text)
|
||||
latestText (TextArguments textArguments) = do
|
||||
uri <- liftIO $ useHttpsURI <$> mkURI textArguments
|
||||
packagistResponse <- traverse (runReq defaultHttpConfig) $ go . fst <$> uri
|
||||
packagistResponse <- traverse (runReq defaultHttpConfig . go . fst) uri
|
||||
|
||||
pure $ Text.strip . Text.Encoding.decodeASCII . responseBody
|
||||
<$> packagistResponse
|
||||
|
@ -21,7 +21,9 @@ common dependencies
|
||||
cryptonite >= 0.30,
|
||||
filepath ^>= 1.4.2,
|
||||
modern-uri ^>= 0.3.6,
|
||||
text ^>= 2.0
|
||||
text ^>= 2.0,
|
||||
tomland ^>= 1.3.3,
|
||||
transformers ^>= 0.5.6
|
||||
default-language: Haskell2010
|
||||
default-extensions:
|
||||
DataKinds
|
||||
@ -34,7 +36,7 @@ common dependencies
|
||||
TemplateHaskell
|
||||
TypeApplications
|
||||
|
||||
library slackbuilder-internal
|
||||
library
|
||||
import: dependencies
|
||||
exposed-modules:
|
||||
SlackBuilder.Config
|
||||
@ -42,9 +44,7 @@ library slackbuilder-internal
|
||||
SlackBuilder.Trans
|
||||
hs-source-dirs: lib
|
||||
build-depends:
|
||||
exceptions >= 0.10,
|
||||
tomland ^>= 1.3.3,
|
||||
transformers ^>= 0.5.6
|
||||
exceptions >= 0.10
|
||||
|
||||
ghc-options: -Wall
|
||||
|
||||
@ -64,6 +64,7 @@ executable slackbuilder
|
||||
optparse-applicative ^>= 0.18.1,
|
||||
process ^>= 1.6.17,
|
||||
req ^>= 3.13,
|
||||
slackbuilder,
|
||||
unordered-containers ^>= 0.2.19,
|
||||
vector ^>= 0.13.0
|
||||
hs-source-dirs: app
|
||||
@ -80,6 +81,6 @@ test-suite slackbuilder-test
|
||||
hs-source-dirs: tests
|
||||
build-depends:
|
||||
hspec >= 2.10.9 && < 2.12,
|
||||
slackbuilder-internal
|
||||
slackbuilder
|
||||
|
||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
|
||||
|
Loading…
Reference in New Issue
Block a user