propellor-5.3.3: property-based host configuration management in haskell

Safe Haskell | None
Language | Haskell98

Propellor.Property.Git

Synopsis

- daemonRunning :: FilePath -> RevertableProperty DebianLike DebianLike
- installed :: Property DebianLike
- type RepoUrl = String
- type Branch = String
- cloned :: User -> RepoUrl -> FilePath -> Maybe Branch -> Property DebianLike
- pulled :: User -> RepoUrl -> FilePath -> Maybe Branch -> Property DebianLike
- isGitDir :: FilePath -> IO Bool
- data GitShared
  - = Shared Group
  - | SharedAll
  - | NotShared
- bareRepo :: FilePath -> User -> GitShared -> Property UnixLike
- repoConfigured :: FilePath -> (String, String) -> Property UnixLike
- getRepoConfig :: FilePath -> String -> IO [String]
- repoAcceptsNonFFs :: FilePath -> RevertableProperty UnixLike UnixLike
- bareRepoDefaultBranch :: FilePath -> String -> Property UnixLike

# Documentation

daemonRunning :: FilePath -> RevertableProperty DebianLike DebianLike Source #

Exports all git repos in a directory (that user nobody can read) using git-daemon, run from inetd.

Note that reverting this property does not remove or stop inetd.

installed :: Property DebianLike Source #

type RepoUrl = String Source #

type Branch = String Source #

cloned :: User -> RepoUrl -> FilePath -> Maybe Branch -> Property DebianLike Source #

Specified git repository is cloned to the specified directory.

If the directory exists with some other content (either a non-git repository, or a git repository cloned from some other location), it will be recursively deleted first.

A branch can be specified, to check out.

Does not make subsequent changes be pulled into the repository after it's cloned.

pulled :: User -> RepoUrl -> FilePath -> Maybe Branch -> Property DebianLike Source #

Specified git repository is cloned to the specified directory, and any new commits are pulled into it each time this property runs.

isGitDir :: FilePath -> IO Bool Source #

data GitShared Source #

Constructors

Shared Group |
SharedAll |
NotShared |

bareRepo :: FilePath -> User -> GitShared -> Property UnixLike Source #

Sets up a new, empty bare git repository.

repoConfigured :: FilePath -> (String, String) -> Property UnixLike Source #

Set a key value pair in a git repo's configuration.

getRepoConfig :: FilePath -> String -> IO [String] Source #

Gets the value that a key is set to in a git repo's configuration.

repoAcceptsNonFFs :: FilePath -> RevertableProperty UnixLike UnixLike Source #

Whether a repo accepts non-fast-forward pushes.

bareRepoDefaultBranch :: FilePath -> String -> Property UnixLike Source #

Sets a bare repository's default branch, which will be checked out when cloning it.