From bc52075a1fe9fc84cc7f542c8c636b2286b5d50f Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Sat, 25 Aug 2018 11:33:13 -0700 Subject: [PATCH] lowercase package name for Repology urls closes #74 --- src/Update.hs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Update.hs b/src/Update.hs index 66a9e3d..b94d725 100644 --- a/src/Update.hs +++ b/src/Update.hs @@ -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