biegunka-0.2: DSL definitions, interpreters, templating, git support

Safe HaskellNone

Control.Biegunka.Source.Git

Contents

Description

Support for git repositories as Sources

Synopsis

Source layer

git' :: URI -> FilePath -> Git -> Script Sources ()Source

Clone repository from the url to the specified path using provided Git settings. Sample:

 git' "git@github.com:edwinb/Idris-dev" "git/Idris-dev" $ def
   & remotes .~ ["origin", "stream"]
   & branch .~ "develop"
   & actions .~ do
       link "contribs/tool-support/vim" ".vim/bundle/idris-vim"
  1. Clone repository from https://github.com/edwinb/Idris-dev.git to ~/git/Idris-dev
  2. Merge origin/develop into develop
  3. Merge stream/develop into develop
  4. Checkout to develop
  5. Link ~/git/Idris-dev/contribs/tool-support/vim to ~/.vim/bundle/Idris-vim

git :: URI -> FilePath -> Script Actions () -> Script Sources ()Source

Wrapper over git' that provides easy specification of actions field

git_ :: URI -> FilePath -> Script Sources ()Source

Wrapper over git that does not provide anything

Types

data Git Source

Git repository's settings

Constructors

Git 

Fields

gitactions :: Script Actions ()

Actions to run after repository update

_remotes :: [Remote]

Remotes to merge on update

_branch :: Branch

Branch to track

Instances

Default Git 
Sourceable Git 

defaultGit :: GitSource

Do nothing except pulling origin/master into master

Lenses

actions :: Sourceable s => Lens' s (Script Actions ())Source

Actions to run after source update

remotes :: Lens' Git [Remote]Source

Remotes to merge on update

branch :: Lens' Git BranchSource

Branch to track

Type synonyms

Convenient self-described types to remind yourself where is which argument

type Branch = StringSource

Branch name (like master or develop)

type Remote = StringSource

Remote name (like origin or upstream)

type URI = StringSource

Repository URI (like git@github.com:whoever/whatever.git)