BSD-3-Clause licensed by Dan Burton

Module documentation for 0.2.1

This version can be pinned in stack with:yesod-gitrev-0.2.1@sha256:b9ce42931fa4fd0e95a34f930f08b251adac54361be78cc6eb0b8375764530ea,1277

A subsite for displaying git information.

Hackage Build Status

You can use the gitRev splice (or tGitRev typed splice) to generate a value of type GitRev. Put this in your app’s foundation, add a route to the subsite, and you’re good to go.

See [Haskell and Yesod > Creating a Subsite] (http://www.yesodweb.com/book/creating-a-subsite) for details on how Yesod subsites work.

-- examples/Main.hs

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes       #-}
{-# LANGUAGE TemplateHaskell   #-}
{-# LANGUAGE TypeFamilies      #-}

import Yesod
import Yesod.GitRev

data Master = Master
  { getGitRev :: GitRev
  }

mkYesod "Master" [parseRoutes|
/build-version GitRevR GitRev getGitRev
|]

instance Yesod Master

main = warp 3000 $ Master $$(tGitRev)

Changes

0.2.1

  • Move over to githash

0.2.0.0

  • Upgrade to yesod-core 1.6
comments powered byDisqus