lowercase package name for Repology urls

closes #74
This commit is contained in:
Ryan Mulligan 2018-08-25 11:33:13 -07:00
parent 4a1b489af7
commit bc52075a1f

View File

@ -225,18 +225,21 @@ publishPackage log updateEnv oldSrcUrl newSrcUrl attrPath result = do
Git.cleanAndResetToMaster
return True
repologyUrl :: UpdateEnv -> Text
repologyUrl = packageName >>> T.toLower
commitMessage :: UpdateEnv -> Text -> Text
commitMessage updateEnv attrPath =
let oV = oldVersion updateEnv
nV = newVersion updateEnv
pN = packageName updateEnv
repologyLink = repologyUrl updateEnv
in [text|
$attrPath: $oV -> $nV
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/$pN/versions.
$repologyLink
|]
brokenWarning :: Bool -> Text
@ -260,12 +263,12 @@ prMessage updateEnv isBroken metaDescription releaseUrlMessage compareUrlMessage
let brokenMsg = brokenWarning isBroken
oV = oldVersion updateEnv
nV = newVersion updateEnv
pN = packageName updateEnv
repologyLink = repologyUrl updateEnv
result = toTextIgnore resultPath
in [text|
$attrPath: $oV -> $nV
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/$pN/versions.
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from $repologyLink.
$brokenMsg
$metaDescription
$releaseUrlMessage