Skip to content

Instantly share code, notes, and snippets.

@vigoo
Created June 6, 2014 10:14
Show Gist options
  • Save vigoo/298e1495f6543087d74d to your computer and use it in GitHub Desktop.
Save vigoo/298e1495f6543087d74d to your computer and use it in GitHub Desktop.
Trying to run git with shelly
{-# LANGUAGE OverloadedStrings #-}
import Shelly
import Data.Text as T
default (T.Text)
main = shelly $ do
git "pull" []
last_commit <- git "log" ["--oneline", "-n 1"]
echo $ append "Last commit in this repo was: " last_commit
where
git cmd params = run "git" (cmd : params)
name: shelly-try
version: 0.1.0.0
build-type: Simple
cabal-version: >=1.10
executable shelly-try
main-is: Main.hs
build-depends: base >=4.6 && <4.7,
text,
shelly
default-language: Haskell2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment