mirror of
https://github.com/nix-community/nixpkgs-update.git
synced 2024-12-01 14:34:56 +03:00
Merge remote-tracking branch 'tomberek/master'
This commit is contained in:
commit
5eb0cbed2d
@ -17,6 +17,7 @@ module Nix
|
||||
, parseStringList
|
||||
, build
|
||||
, getDescription
|
||||
, getHomepage
|
||||
, cachix
|
||||
, assertOneOrFewerFetcher
|
||||
, getHashFromBuild
|
||||
@ -156,6 +157,14 @@ getDescription attrPath =
|
||||
".meta.description or \"\")") &
|
||||
overwriteErrorT ("Could not get meta.description for attrpath " <> attrPath)
|
||||
|
||||
getHomepage :: MonadIO m => Text -> ExceptT Text m Text
|
||||
getHomepage attrPath =
|
||||
nixEvalET
|
||||
NoRaw
|
||||
("(let pkgs = import ./. {}; in pkgs." <> attrPath <>
|
||||
".meta.homepage or \"\")") &
|
||||
overwriteErrorT ("Could not get meta.homepage for attrpath " <> attrPath)
|
||||
|
||||
getSrcUrl :: MonadIO m => Text -> ExceptT Text m Text
|
||||
getSrcUrl =
|
||||
srcOrMain
|
||||
|
@ -178,8 +178,11 @@ publishPackage log updateEnv oldSrcUrl newSrcUrl attrPath result opDiff = do
|
||||
Right () -> lift $ Check.result updateEnv result
|
||||
Left msg -> pure msg
|
||||
d <- Nix.getDescription attrPath
|
||||
u <- Nix.getHomepage attrPath
|
||||
let metaDescription =
|
||||
"\n\nmeta.description for " <> attrPath <> " is: '" <> d <> "'."
|
||||
let metaHomepage =
|
||||
"\n\nmeta.homepage for " <> attrPath <> " is: '" <> u
|
||||
releaseUrlMessage <-
|
||||
(do msg <- GH.releaseUrl newSrcUrl
|
||||
return ("\n[Release on GitHub](" <> msg <> ")\n\n")) <|>
|
||||
@ -211,6 +214,7 @@ publishPackage log updateEnv oldSrcUrl newSrcUrl attrPath result opDiff = do
|
||||
updateEnv
|
||||
isBroken
|
||||
metaDescription
|
||||
metaHomepage
|
||||
releaseUrlMessage
|
||||
compareUrlMessage
|
||||
resultCheckReport
|
||||
@ -258,7 +262,8 @@ prMessage ::
|
||||
-> Text
|
||||
-> Text
|
||||
-> Text
|
||||
prMessage updateEnv isBroken metaDescription releaseUrlMessage compareUrlMessage resultCheckReport commitHash attrPath maintainersCc resultPath opReport =
|
||||
-> Text
|
||||
prMessage updateEnv isBroken metaDescription metaHomepage releaseUrlMessage compareUrlMessage resultCheckReport commitHash attrPath maintainersCc resultPath opReport =
|
||||
let brokenMsg = brokenWarning isBroken
|
||||
title = prTitle updateEnv attrPath
|
||||
repologyLink = repologyUrl updateEnv
|
||||
|
Loading…
Reference in New Issue
Block a user