repository

package
v0.5.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HomeDir = ""
)

Functions

This section is empty.

Types

type Git

type Git struct {
	Remote
	Path string
}

Git repository.

func (*Git) Branch

func (r *Git) Branch(name string) (err error)

Branch creates a branch with the given name if not exist and switch to it.

func (*Git) Commit

func (r *Git) Commit(files []string, msg string) (err error)

Commit files and push to remote.

func (*Git) Fetch

func (r *Git) Fetch() (err error)

Fetch clones the repository.

func (*Git) URL

func (r *Git) URL() (u GitURL)

URL returns the parsed URL.

func (*Git) Validate

func (r *Git) Validate() (err error)

Validate settings.

type GitURL

type GitURL struct {
	Raw    string
	Scheme string
	Host   string
	Path   string
}

GitURL git clone URL.

func (*GitURL) String

func (r *GitURL) String() string

String representation.

func (*GitURL) With

func (r *GitURL) With(u string) (err error)

With populates the URL.

type Maven

type Maven struct {
	Remote
	BinDir string
	M2Dir  string
}

Maven repository.

func (*Maven) CreateSettingsFile added in v0.3.0

func (r *Maven) CreateSettingsFile() (path string, err error)

CreateSettingsFile creates the maven settings.xml file Will exit with path and nil error if file exists already

func (*Maven) DeleteArtifacts

func (r *Maven) DeleteArtifacts(sourceDir string) (err error)

DeleteArtifacts deletes application artifacts.

func (*Maven) Fetch

func (r *Maven) Fetch(sourceDir string) (err error)

Fetch fetches dependencies listed in the POM.

func (*Maven) FetchArtifact

func (r *Maven) FetchArtifact(artifact string) (err error)

FetchArtifact fetches an application artifact.

func (*Maven) HasModules

func (r *Maven) HasModules(sourceDir string) (found bool, err error)

HasModules determines if the POM specifies modules.

func (*Maven) InstallArtifacts

func (r *Maven) InstallArtifacts(sourceDir string) (err error)

InstallArtifacts installs application artifacts.

type Remote added in v0.1.0

type Remote struct {
	*api.Repository
	Identities []api.Ref
	Insecure   bool
}

Remote repository.

type SCM

type SCM interface {
	Validate() (err error)
	Fetch() (err error)
	Branch(name string) (err error)
	Commit(files []string, msg string) (err error)
}

SCM interface.

func New

func New(destDir string, remote *api.Repository, identities []api.Ref) (r SCM, err error)

New SCM repository factory.

type Subversion

type Subversion struct {
	Remote
	Path string
}

Subversion repository.

func (*Subversion) Branch

func (r *Subversion) Branch(name string) error

func (*Subversion) Commit

func (r *Subversion) Commit(files []string, msg string) (err error)

Commit records changes to the repo and push to the server

func (*Subversion) Fetch

func (r *Subversion) Fetch() (err error)

Fetch clones the repository.

func (*Subversion) URL

func (r *Subversion) URL() (u *urllib.URL)

URL returns the parsed URL.

func (*Subversion) Validate

func (r *Subversion) Validate() (err error)

Validate settings.

Jump to

Keyboard shortcuts

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