yeet

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: CC0-1.0 Imports: 8 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	WD      string
	DateTag string
)

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

Functions

func DockerBuild

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

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

func DockerLoadResult added in v1.4.0

func DockerLoadResult(ctx context.Context, at string)

DockerLoadResult loads a nix-built docker image

func DockerPush added in v1.4.0

func DockerPush(ctx context.Context, image string)

DockerPush pushes a docker image to a given host

func DockerTag

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

DockerTag tags a docker image

func GitTag

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

GitTag returns the curreng git tag.

func Output

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

Output returns the output of a command or an error.

func ShouldWork

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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