repohandler

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitSplits

func InitSplits(log *zap.Logger, sp *config.Splits) error

InitSplits iterates over the configured splits and initialises a working directory for each one of them in the configured WorkTree. If configured, the remote repository for each split is then fetched into this working directory. If the remote repository is empty or no remote is configured a new empty git repository is initialised instead.

The prequisites on the fields of a config.Splits object for InitSplits to be able to operate are:

  • The WorkTree field is populated and corresponds to an existing directory.
  • For each config.Split in Splits the Name field has been populated.
  • For each config.Split in Splits the WorkDir field is either unpopulated or it corrresponds to a non-existing or empty directory.

func PushSplits

func PushSplits(log *zap.Logger, sp *modularise_config.Splits) error

PushSplits iterates over the configured splits and, if they have a remote repository configured, pushed any new local content to the target branch.

The prequisites on the fields of a config.Splits object for PushSplits to be able to operate are:

  • For each config.Split in Splits the WorkDir field is populated and corrresponds to an existing directory.
  • For each config.Split in Splits the Repo field is populated and corrresponds to an existing repository.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL