common

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Architectures is a list of architectures to build binaries for.
	Architectures = []string{"amd64", "arm"}
	// OSList is a list of all OSes to build binaries for.
	OSList = []string{osLinux, osWindows, osDarwin}
)
View Source
var (
	UI = clui.NewUI()
)

Functions

func Build

func Build(args ...string) error

Build builds the project.

func BuildAll

func BuildAll(args ...string) error

BuildAll builds all binaries for all OSes and architectures.

func BuildAllReleaser added in v0.4.1

func BuildAllReleaser(args ...string) error

BuildAllReleaser builds all binaries for all OSes and architectures, in preparation for a release.

func BuildReleaser added in v0.4.1

func BuildReleaser(args ...string) error

BuildReleaser builds the project.

func Commit

func Commit() (string, error)

func CopyOpenAPI

func CopyOpenAPI(repo, service, outfile string) error

func CreateOpenAPI

func CreateOpenAPI(repo, outfile string, subServices []string) error

func DockerImage

func DockerImage(repositoryAndTag string, args ...string) error

DockerImage builds the docker image for the project.

func DockerPush added in v0.4.2

func DockerPush(existingImage, imageToPush string) error

DockerPush pushes an image

func DockerTags added in v0.4.2

func DockerTags(registry, image string) ([]string, error)

DockerTags uses sver to get a list of tags to be pushed. Expects env vars DOCKER_USERNAME and DOCKER_PASSWORD to be set.

func Generate

func Generate(paths ...string) error

Generate runs go generate for the specified paths. If no paths are used, it generates for './...'.

func GitPushTag added in v0.3.3

func GitPushTag(tag, remote string) error

func GitTag added in v0.3.3

func GitTag(tag string) error

func IsDirty added in v0.3.3

func IsDirty(version string) bool

func Lint

func Lint() error

Lint runs linting against the project.

func MergeOpenAPI

func MergeOpenAPI(repo, outfile string, subServices []string) error

func NextVersion added in v0.3.3

func NextVersion(part string) (string, error)

func Test

func Test(args ...string) error

Test runs all tests in the project using gotestsum.

func Version

func Version() (string, error)

func WorkDir

func WorkDir() string

WorkDir returns the current working directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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