summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/PropellorRepo.hs
diff options
context:
space:
mode:
authorSean Whitton2019-04-03 07:49:03 -0700
committerJoey Hess2019-04-03 12:11:52 -0400
commit9d682a8340ce8b8ada18dd378a9869a71a279427 (patch)
treee85807269bb900e53f34d399f0adb87aa15f110b /src/Propellor/Property/PropellorRepo.hs
parent3baf3a03b764b0a61254af7fa175a427a5455790 (diff)
rename Propellor.Property.{PropellorRepo -> Localdir}
This is to accommodate a new property in that module which is about /usr/local/propellor, but not only about the git repo there. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/Propellor/Property/PropellorRepo.hs')
-rw-r--r--src/Propellor/Property/PropellorRepo.hs29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/Propellor/Property/PropellorRepo.hs b/src/Propellor/Property/PropellorRepo.hs
deleted file mode 100644
index 825efdfd..00000000
--- a/src/Propellor/Property/PropellorRepo.hs
+++ /dev/null
@@ -1,29 +0,0 @@
-{-# LANGUAGE DeriveDataTypeable #-}
-
-module Propellor.Property.PropellorRepo where
-
-import Propellor.Base
-import Propellor.Git.Config
-import Propellor.Types.Info
-
--- | Sets the url to use as the origin of propellor's git repository.
---
--- By default, the url is taken from the deploy or origin remote of
--- the repository that propellor --spin is run in. Setting this property
--- overrides that default behavior with a different url.
---
--- When hosts are being updated without using -- --spin, eg when using
--- the `Propellor.Property.Cron.runPropellor` cron job, this property can
--- be set to redirect them to a new git repository url.
-hasOriginUrl :: String -> Property (HasInfo + UnixLike)
-hasOriginUrl u = setInfoProperty p (toInfo (InfoVal (OriginUrl u)))
- where
- p :: Property UnixLike
- p = property ("propellor repo url " ++ u) $ do
- curru <- liftIO getRepoUrl
- if curru == Just u
- then return NoChange
- else makeChange $ setRepoUrl u
-
-newtype OriginUrl = OriginUrl String
- deriving (Show, Typeable)