propellor spin

This commit is contained in:
Joey Hess 2014-11-19 21:48:48 -04:00
parent d380376825
commit d130e7e628
Failed to extract signature
3 changed files with 10 additions and 6 deletions

View File

@ -69,7 +69,8 @@ fetchOrigin = do
branchref <- getCurrentBranch branchref <- getCurrentBranch
let originbranch = "origin" </> branchref let originbranch = "origin" </> branchref
void $ actionMessage "Git fetch" $ boolSystem "git" [Param "fetch"] void $ actionMessage "Pull from central git repository" $
boolSystem "git" [Param "fetch"]
oldsha <- getCurrentGitSha1 branchref oldsha <- getCurrentGitSha1 branchref

View File

@ -15,16 +15,19 @@ import Control.Applicative
import Propellor.Types import Propellor.Types
import Utility.Monad import Utility.Monad
import Utility.Env import Utility.Env
import Utility.FileSystemEncoding
data MessageHandle data MessageHandle
= ConsoleMessageHandle = ConsoleMessageHandle
| TextMessageHandle | TextMessageHandle
mkMessageHandle :: IO MessageHandle mkMessageHandle :: IO MessageHandle
mkMessageHandle = ifM (hIsTerminalDevice stdout <||> (isJust <$> getEnv "PROPELLOR_CONSOLE")) mkMessageHandle = do
( return ConsoleMessageHandle fileEncoding stdout
, return TextMessageHandle ifM (hIsTerminalDevice stdout <||> (isJust <$> getEnv "PROPELLOR_CONSOLE"))
) ( return ConsoleMessageHandle
, return TextMessageHandle
)
forceConsole :: IO () forceConsole :: IO ()
forceConsole = void $ setEnv "PROPELLOR_CONSOLE" "1" True forceConsole = void $ setEnv "PROPELLOR_CONSOLE" "1" True

View File

@ -20,7 +20,7 @@ import Utility.FileMode
import Utility.SafeCommand import Utility.SafeCommand
-- Update the privdata, repo url, and git repo over the ssh -- Update the privdata, repo url, and git repo over the ssh
-- connection, talking the the user's local propellor instance which is -- connection, talking to the user's local propellor instance which is
-- running the updateServer -- running the updateServer
update :: IO () update :: IO ()
update = do update = do