repoman

package module
Version: v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

README

Repoman

Repoman is an utility to manage subrepositories inside mage. Right now it has three mage commands:

  • Pull This command clones the repository if doesn't exists and pull the latest changes if it does.
  • Status This command shows the status of the local branches to learn if you need to pull or push on any repository.
  • Prune This command prunes all the remote branches that have already been deleted.

In the near future I plan to add a new command to push all the pending commits to the proper repositories.

Config file

The projects are defined in a config.yml file like the following:

projects:
  repoman:
    repository: "git@github.com:i02sopop/repoman.git"

groups:
  libs:
    mage:
      repository: "git@github.com:magefile/mage.git"

The example config file creates the following directory structure:

repoman/
  <repoman git repo>
libs/
  mage/
    <mage git repo>

The tool doesn't tie you to any git provider (public or private), so it's important that you put the git url you want to do the clone from.

Documentation

Overview

Package repoman add some commands to magefile to manage git repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Prune

func Prune() error

Prune the remote branches not defined anymore.

func Pull

func Pull() error

Pull clones and pulls all the repositories.

func Status

func Status() error

Status provides the status of each git repository.

Types

type Config

type Config struct {
	Projects map[string]*Repo `yaml:"projects"`
	Groups   map[string]Group `yaml:"groups"`
}

type Group

type Group map[string]*Repo

type Repo

type Repo struct {
	Name string `yaml:"name"`
	Repo string `yaml:"repository"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL