packages feed

githash 0.1.0.1 → 0.1.1.0

raw patch · 5 files changed

+21/−5 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ GitHash: giCommitMessage :: GitInfo -> String

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # ChangeLog for githash +## 0.1.1.0++* Add message of the most recent commit+ ## 0.1.0.1  * Update the test suite
githash.cabal view
@@ -1,13 +1,13 @@-cabal-version: >= 1.10+cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.29.0.+-- This file has been generated from package.yaml by hpack version 0.30.0. -- -- see: https://github.com/sol/hpack ----- hash: c672737e59eb8b5ab055f12dee75b9283b13f55d02e13201c846689414798949+-- hash: 380f229f7ff7b7cb44366114b73ff9012ed62bf5baef879380562b3c56ed80e9  name:           githash-version:        0.1.0.1+version:        0.1.1.0 synopsis:       Compile git revision info into Haskell projects description:    Please see the README and documentation at <https://www.stackage.org/package/githash> category:       Development@@ -19,8 +19,8 @@ license-file:   LICENSE build-type:     Simple extra-source-files:-    ChangeLog.md     README.md+    ChangeLog.md  source-repository head   type: git
src/GitHash.hs view
@@ -45,6 +45,7 @@   , giDirty   , giCommitDate   , giCommitCount+  , giCommitMessage     -- * Creators   , getGitInfo   , getGitRoot@@ -79,6 +80,7 @@   , _giCommitDate :: !String   , _giCommitCount :: !Int   , _giFiles :: ![FilePath]+  , _giCommitMessage :: !String   }   deriving (Lift, Show) @@ -103,6 +105,12 @@ giCommitCount :: GitInfo -> Int giCommitCount = _giCommitCount +-- | The message of the most recent commit.+--+-- @since 0.1.1.0+giCommitMessage :: GitInfo -> String+giCommitMessage = _giCommitMessage+ -- | Get the 'GitInfo' for the given root directory. Root directory -- should be the directory containing the @.git@ directory. --@@ -159,6 +167,8 @@       Just x -> return x    _giCommitDate <- run ["log", "HEAD", "-1", "--format=%cd"]++  _giCommitMessage <- run ["log", "-1", "--pretty=%B"]    return GitInfo {..} 
test/NormalRepoSpec.hs view
@@ -29,6 +29,7 @@                         giDirty gi `shouldBe` False                         giCommitDate gi `shouldNotBe` []                         giCommitCount gi `shouldBe` 1+                        giCommitMessage gi `shouldBe` "Initial commit"         describe "getGitRoot" $ do             it "it gets the expected git root for a regular git repository" $ \fp ->                 getGitRoot fp `shouldReturn` Right fp
test/RepoWithASubmoduleSpec.hs view
@@ -31,6 +31,7 @@                                 giDirty gi `shouldBe` False                                 giCommitDate gi `shouldNotBe` []                                 giCommitCount gi `shouldBe` 1+                                giCommitMessage gi `shouldBe` "Initial commit"                 sensible fp1                 sensible fp2         describe "getGitRoot" $ do