Created
June 6, 2014 10:14
-
-
Save vigoo/298e1495f6543087d74d to your computer and use it in GitHub Desktop.
Trying to run git with shelly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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