Documentation ¶
Index ¶
- type MageProject
- func (p *MageProject) Build() error
- func (p *MageProject) BuildWithDocker() error
- func (p *MageProject) ChangeLog() error
- func (p *MageProject) Clean() error
- func (p *MageProject) CleanAll() error
- func (p *MageProject) Deploy() error
- func (p *MageProject) DockerBuildImage() error
- func (p *MageProject) DockerPushImage() error
- func (p *MageProject) MageLibrary() *mgl.MageLibrary
- func (p *MageProject) Package() error
- func (p *MageProject) PrintInfo() string
- func (p *MageProject) Test() error
- func (p *MageProject) Validate() error
- type MageProjectOption
- func WithArtifactURL(val string) MageProjectOption
- func WithBuildDir(val string) MageProjectOption
- func WithCompileFlags(val string) MageProjectOption
- func WithDockerAppPath(val string) MageProjectOption
- func WithDockerImage(val string) MageProjectOption
- func WithDockerRegistry(val string) MageProjectOption
- func WithGitURL(val string) MageProjectOption
- func WithGroupName(val string) MageProjectOption
- func WithTestFlags(val string) MageProjectOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MageProject ¶
type MageProject struct {
// contains filtered or unexported fields
}
MageProject provides Mage dependent high level targets to reuse as is
func NewMageProject ¶ added in v0.6.0
func NewMageProject(workdir, projectName, packageName string, options ...MageProjectOption) *MageProject
NewMageProject constructs new MageLibrary instance
func (*MageProject) BuildWithDocker ¶ added in v0.5.0
func (p *MageProject) BuildWithDocker() error
BuildWithDocker builds binary in build dir using a Dockerfile.build file
func (*MageProject) ChangeLog ¶ added in v0.5.4
func (p *MageProject) ChangeLog() error
ChangeLog generates a ChangeLog based on git history
func (*MageProject) CleanAll ¶ added in v0.5.0
func (p *MageProject) CleanAll() error
CleanAll removes the build directory and the docker image used for build
func (*MageProject) Deploy ¶ added in v0.5.10
func (p *MageProject) Deploy() error
Deploy deploys cross platform binaries to artifacts registry
func (*MageProject) DockerBuildImage ¶ added in v0.5.0
func (p *MageProject) DockerBuildImage() error
DockerBuildImage builds Docker image
func (*MageProject) DockerPushImage ¶ added in v0.5.0
func (p *MageProject) DockerPushImage() error
DockerPushImage pushes Docker image to a repository
func (*MageProject) MageLibrary ¶
func (p *MageProject) MageLibrary() *mgl.MageLibrary
MageLibrary gets Mage library used by this project
func (*MageProject) Package ¶
func (p *MageProject) Package() error
Package packages cross platform binaries in build dir
func (*MageProject) PrintInfo ¶
func (p *MageProject) PrintInfo() string
PrintInfo prints information used internally
func (*MageProject) Validate ¶
func (p *MageProject) Validate() error
Validate runs go format and linters
type MageProjectOption ¶ added in v0.6.0
type MageProjectOption func(*MageProject)
MageProjectOption defines an operation which set an option
func WithArtifactURL ¶ added in v0.6.0
func WithArtifactURL(val string) MageProjectOption
WithArtifactURL TODO
func WithBuildDir ¶ added in v0.6.0
func WithBuildDir(val string) MageProjectOption
WithBuildDir TODO
func WithCompileFlags ¶ added in v0.6.0
func WithCompileFlags(val string) MageProjectOption
WithCompileFlags TODO
func WithDockerAppPath ¶ added in v0.6.0
func WithDockerAppPath(val string) MageProjectOption
WithDockerAppPath TODO
func WithDockerImage ¶ added in v0.6.0
func WithDockerImage(val string) MageProjectOption
WithDockerImage TODO
func WithDockerRegistry ¶ added in v0.6.0
func WithDockerRegistry(val string) MageProjectOption
WithDockerRegistry TODO
func WithGroupName ¶ added in v0.6.0
func WithGroupName(val string) MageProjectOption
WithGroupName TODO
func WithTestFlags ¶ added in v1.0.1
func WithTestFlags(val string) MageProjectOption
WithTestFlags TODO