Documentation ¶
Index ¶
- func Log(msg string)
- func Logf(msg string, v ...interface{})
- 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) Release() error
- 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 ¶
Types ¶
type MageProject ¶
type MageProject struct {
// contains filtered or unexported fields
}
MageProject provides Mage dependent high level targets to reuse as is
func NewMageProject ¶
func NewMageProject(workdir, projectName, packageName string, options ...MageProjectOption) *MageProject
NewMageProject constructs a new MageProject instance
func (*MageProject) BuildWithDocker ¶
func (p *MageProject) BuildWithDocker() error
BuildWithDocker builds binary in build dir using a Dockerfile.build file
func (*MageProject) ChangeLog ¶
func (p *MageProject) ChangeLog() error
ChangeLog generates a ChangeLog based on git history
func (*MageProject) CleanAll ¶
func (p *MageProject) CleanAll() error
CleanAll removes the build directory and the docker image used for build
func (*MageProject) Deploy ¶
func (p *MageProject) Deploy() error
Deploy deploys cross platform binaries to artifacts registry
func (*MageProject) DockerBuildImage ¶
func (p *MageProject) DockerBuildImage() error
DockerBuildImage builds Docker image
func (*MageProject) DockerPushImage ¶
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) Release ¶
func (p *MageProject) Release() error
Release creates a git tag and push it to remote
func (*MageProject) Validate ¶
func (p *MageProject) Validate() error
Validate runs go format and linters
type MageProjectOption ¶
type MageProjectOption func(*MageProject)
MageProjectOption defines an operation which set an option
func WithArtifactURL ¶
func WithArtifactURL(val string) MageProjectOption
WithArtifactURL sets artifactURL to value
func WithBuildDir ¶
func WithBuildDir(val string) MageProjectOption
WithBuildDir sets buildDir to value
func WithCompileFlags ¶
func WithCompileFlags(val string) MageProjectOption
WithCompileFlags sets ldFlags to value
func WithDockerAppPath ¶
func WithDockerAppPath(val string) MageProjectOption
WithDockerAppPath sets dckAppPath to value
func WithDockerImage ¶
func WithDockerImage(val string) MageProjectOption
WithDockerImage sets dckImage to value
func WithDockerRegistry ¶
func WithDockerRegistry(val string) MageProjectOption
WithDockerRegistry sets dckRegistry to value
func WithGroupName ¶
func WithGroupName(val string) MageProjectOption
WithGroupName sets groupName to value
func WithTestFlags ¶
func WithTestFlags(val string) MageProjectOption
WithTestFlags sets testFlags to value