repoman

package module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

README

Repoman

Repoman is an utility to manage subrepositories inside mage. Right now it has four 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.
  • ChangeAuthor Changes the email and name locally for the configured repositories.

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:

author:
  name: Ritho
  email: palvarez@ritho.net

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.

License

Repoman is licensed under the GNU GPLv3. You should have received a copy of the GNU General Public License along with repoman. If not, see http://www.gnu.org/licenses/.

GNU GPLv3

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 ChangeAuthor added in v0.3.0

func ChangeAuthor() error

ChangeAuthor change the repositories author configurations.

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 Author added in v0.3.0

type Author struct {
	Email string `yaml:"email"`
	Name  string `yaml:"name"`
}

type Config

type Config struct {
	Author   Author           `yaml:"author"`
	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
y or Y : Canonical URL