reposetup

package
v0.0.0-...-b7a57f2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TopRepoDirName is the name of the top-repo
	// ususally the first repo containing a .bob directory
	TopRepoDirName = "top-repo"

	// ChildReposDirName syntetically created repos for testing purpose
	ChildReposDirName = "repos"
)

Variables

View Source
var (
	ChildOne   = "child1"
	ChildTwo   = "child2"
	ChildThree = "child3"

	Childs = []string{
		ChildOne,
		ChildTwo,
		ChildThree,
	}

	ChildRecursive  = "childrecursive"
	ChildPlayground = "childplayground"
)

Names for the used child repos.

Functions

func BaseTestStructure

func BaseTestStructure(basePath string) (topRepo string, childs []string, recursive, playgroundRepo string, err error)

BaseTestStructure fill a existing directory with basic testing blueprints. The generated structure looks like:

basePath/ basePath/top-repo basePath/top-repo/.git basePath/repos/child1/.git basePath/repos/child2/.git basePath/repos/child3/.git

TODO: @leonklingele update this comment with the playground stuff.

The top-repo is intended to call `bob init`. The child repos can be add to the top repo using `bob add`

func ChildRepos

func ChildRepos(basePath string) (childs []string, err error)

ChildRepos creates child repos as defined and returns the path to the wrapping directory

func ModifyRepo

func ModifyRepo(path string) error

func PlaygroundRepo

func PlaygroundRepo(basePath string) (_ string, err error)

func RecursiveRepo

func RecursiveRepo(basePath string) (_ string, err error)

func SetupBaseFileStructure

func SetupBaseFileStructure(basePath string) []string

Directory structure:

files ├── deeplynested │   └── a │   ├── b │   │   ├── c │   │   │   ├── d │   │   │   │   ├── f_d_one │   │   │   │   ├── f_d_two │   │   │   │   ├── f_one │   │   │   │   ├── f_three │   │   │   │   └── f_two │   │   │   ├── f_c_one │   │   │   └── f_c_two │   │   ├── f_b_one │   │   └── f_b_two │   └── f_a_one ├── hardlinks ├── regulars │   ├── f_one │   ├── f_three │   └── f_two ├── symlinks └── wildcards

└── a
    ├── b
    │   ├── c
    │   │   ├── d
    │   │   │   ├── f_1
    │   │   │   ├── f_2
    │   │   │   ├── f_3
    │   │   │   ├── f_d_1
    │   │   │   └── f_d_2
    │   │   ├── f_c_1
    │   │   └── f_c_2
    │   ├── f_b_1
    │   └── f_b_2
    └── f_a_1

func TopRepo

func TopRepo(basePath string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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