summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-13 14:12:11 -0400
committerJoey Hess2014-04-13 14:12:11 -0400
commit2e128c8fe25fb92ecfbd0bbe79ea777d53fa11ca (patch)
tree8a1b6e3bbbcf8a84e1edf282ee393f9b38e5c3d5 /Propellor/Property
parent4dac4eea222c5fa8a0cfcb5a4959dd3832a86188 (diff)
propellor spin
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Git.hs6
-rw-r--r--Propellor/Property/SiteSpecific/JoeySites.hs3
2 files changed, 6 insertions, 3 deletions
diff --git a/Propellor/Property/Git.hs b/Propellor/Property/Git.hs
index 6541dc74..431f4134 100644
--- a/Propellor/Property/Git.hs
+++ b/Propellor/Property/Git.hs
@@ -75,8 +75,10 @@ cloned owner url dir mbranch = check originurl (Property desc checkout)
, return True
)
checkout = do
- liftIO $ whenM (doesDirectoryExist dir) $
- removeDirectoryRecursive dir
+ liftIO $ do
+ whenM (doesDirectoryExist dir) $
+ removeDirectoryRecursive dir
+ createDirectoryIfMissing True (takeDirectory dir)
ensureProperty $ userScriptProperty owner $ catMaybes
[ Just $ "git clone " ++ shellEscape url ++ " " ++ shellEscape dir
, Just $ "cd " ++ shellEscape dir
diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs
index 81557b32..fa444160 100644
--- a/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -53,11 +53,12 @@ gitServer hosts = propertyList "git.kitenet.net setup"
, "$feature{'snapshot'}{'default'} = [];"
]
`describe` "gitweb configured"
+ -- I keep the website used for gitweb checked into git..
+ , Git.cloned "joey" "/srv/git/joey/git.kitenet.net.git" "/srv/web/git.kitenet.net" Nothing
, website "git.kitenet.net"
, website "git.joeyh.name"
-- ssh keys for branchable and github repo hooks
-- TODO: upgrade to newer git-annex-shell for notification
- -- gitweb
]
where
website hn = toProp $ Apache.siteEnabled hn (gitapacheconf hn)