x: within.website/x/internal/yeet Index | Files

package yeet

import "within.website/x/internal/yeet"

Package yeet is a set of small helper functions useful for yeeting out scripts.

Index

Package Files

doc.go yeet.go

Variables

var (
    WD      string
    DateTag string
)

current working directory and date:time tag of app boot (useful for tagging slugs)

func DockerBuild Uses

func DockerBuild(ctx context.Context, dir, tag string, args ...string)

DockerBuild builds a docker image with the given working directory and tag.

func DockerTag Uses

func DockerTag(ctx context.Context, org, repo, image string) string

DockerTag tags a docker image

func GitTag Uses

func GitTag(ctx context.Context) (string, error)

GitTag returns the curreng git tag.

func Output Uses

func Output(ctx context.Context, cmd string, args ...string) (string, error)

Output returns the output of a command or an error.

func ShouldWork Uses

func ShouldWork(ctx context.Context, env []string, dir string, cmdName string, args ...string)

ShouldWork explodes if the given command with the given env, working dir and context fails.

Package yeet imports 8 packages (graph). Updated 2019-08-26. Refresh now. Tools for package owners.