propellor spin
This commit is contained in:
parent
adc7669b90
commit
6d13790afa
|
@ -156,14 +156,15 @@ updateFirst' cmdline next = ifM fetchOrigin
|
||||||
|
|
||||||
spin :: HostName -> Maybe HostName -> Host -> IO ()
|
spin :: HostName -> Maybe HostName -> Host -> IO ()
|
||||||
spin target relay hst = do
|
spin target relay hst = do
|
||||||
void $ actionMessage "Git commit" $
|
unless relaying $ do
|
||||||
gitCommit [Param "--allow-empty", Param "-a", Param "-m", Param "propellor spin"]
|
void $ actionMessage "Git commit" $
|
||||||
-- Push to central origin repo first, if possible.
|
gitCommit [Param "--allow-empty", Param "-a", Param "-m", Param "propellor spin"]
|
||||||
-- The remote propellor will pull from there, which avoids
|
-- Push to central origin repo first, if possible.
|
||||||
-- us needing to send stuff directly to the remote host.
|
-- The remote propellor will pull from there, which avoids
|
||||||
whenM hasOrigin $
|
-- us needing to send stuff directly to the remote host.
|
||||||
void $ actionMessage "Push to central git repository" $
|
whenM hasOrigin $
|
||||||
boolSystem "git" [Param "push"]
|
void $ actionMessage "Push to central git repository" $
|
||||||
|
boolSystem "git" [Param "push"]
|
||||||
|
|
||||||
cacheparams <- toCommand <$> sshCachingParams hn
|
cacheparams <- toCommand <$> sshCachingParams hn
|
||||||
when (isJust relay) $
|
when (isJust relay) $
|
||||||
|
@ -179,6 +180,7 @@ spin target relay hst = do
|
||||||
where
|
where
|
||||||
hn = fromMaybe target relay
|
hn = fromMaybe target relay
|
||||||
user = "root@"++hn
|
user = "root@"++hn
|
||||||
|
relaying = relay == Just target
|
||||||
|
|
||||||
mkcmd = shellWrap . intercalate " ; "
|
mkcmd = shellWrap . intercalate " ; "
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue