summaryrefslogtreecommitdiff
path: root/Propellor/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess2014-03-31 16:40:03 -0400
committerJoey Hess2014-03-31 16:40:03 -0400
commit0cf9c40ba0df83d3cac37afa07c3ad4ea78987f9 (patch)
tree12cfb043fb2dd74bf7ec282af27a5bc6958a0fd8 /Propellor/CmdLine.hs
parentfc6a75b27df37135c436390c2e9cf774e50dea0c (diff)
propellor spin
Diffstat (limited to 'Propellor/CmdLine.hs')
-rw-r--r--Propellor/CmdLine.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Propellor/CmdLine.hs b/Propellor/CmdLine.hs
index ed00f51a..93450b42 100644
--- a/Propellor/CmdLine.hs
+++ b/Propellor/CmdLine.hs
@@ -96,9 +96,9 @@ pullFirst cmdline next = do
then putStrLn $ "git branch " ++ originbranch ++ " gpg signature verified; merging"
else error $ "git branch " ++ originbranch ++ " is not signed with a trusted gpg key; refusing to deploy it!"
- oldsha <- getCurrentGitSha1
+ oldsha <- getCurrentGitSha1 branchref
void $ boolSystem "git" [Param "merge", Param originbranch]
- newsha <- getCurrentGitSha1
+ newsha <- getCurrentGitSha1 branchref
if oldsha == newsha
then next
@@ -106,8 +106,8 @@ pullFirst cmdline next = do
void $ boolSystem "make" [Param "build"]
void $ boolSystem "./propellor" [Param "--continue", Param (show cmdline)]
-getCurrentGitSha1 :: IO String
-getCurrentGitSha1 = readProcess "git" ["show-ref", "--hash", "HEAD"]
+getCurrentGitSha1 :: String -> IO String
+getCurrentGitSha1 branchref = readProcess "git" ["show-ref", "--hash", branchref]
spin :: HostName -> IO ()
spin host = do