propellor spin
This commit is contained in:
parent
fc6a75b27d
commit
0cf9c40ba0
|
@ -96,9 +96,9 @@ pullFirst cmdline next = do
|
||||||
then putStrLn $ "git branch " ++ originbranch ++ " gpg signature verified; merging"
|
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!"
|
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]
|
void $ boolSystem "git" [Param "merge", Param originbranch]
|
||||||
newsha <- getCurrentGitSha1
|
newsha <- getCurrentGitSha1 branchref
|
||||||
|
|
||||||
if oldsha == newsha
|
if oldsha == newsha
|
||||||
then next
|
then next
|
||||||
|
@ -106,8 +106,8 @@ pullFirst cmdline next = do
|
||||||
void $ boolSystem "make" [Param "build"]
|
void $ boolSystem "make" [Param "build"]
|
||||||
void $ boolSystem "./propellor" [Param "--continue", Param (show cmdline)]
|
void $ boolSystem "./propellor" [Param "--continue", Param (show cmdline)]
|
||||||
|
|
||||||
getCurrentGitSha1 :: IO String
|
getCurrentGitSha1 :: String -> IO String
|
||||||
getCurrentGitSha1 = readProcess "git" ["show-ref", "--hash", "HEAD"]
|
getCurrentGitSha1 branchref = readProcess "git" ["show-ref", "--hash", branchref]
|
||||||
|
|
||||||
spin :: HostName -> IO ()
|
spin :: HostName -> IO ()
|
||||||
spin host = do
|
spin host = do
|
||||||
|
|
Loading…
Reference in New Issue