exec

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package exec can execute commands on the OS.

Index

Constants

This section is empty.

Variables

View Source
var (
	MockEnvVar = "GORELEASER_MOCK_DATA"
	MockCmd    = os.Args[0]
)

nolint: gochecknoglobals

Functions

func Execute

func Execute(ctx *context.Context, publishers []config.Publisher) error

Execute the given publisher

func ExecuteMockData

func ExecuteMockData(jsonData string) int

func MarshalMockEnv

func MarshalMockEnv(data *MockData) string

MarshalMockEnv mocks marshal.

nolint: interfacer

Types

type MockCall

type MockCall struct {
	Stdout       string   `json:"stdout,omitempty"`
	Stderr       string   `json:"stderr,omitempty"`
	ExpectedArgs []string `json:"args"`
	ExpectedEnv  []string `json:"env"`
	ExitCode     int      `json:"exit_code"`
}

type MockData

type MockData struct {
	AnyOf []MockCall `json:"any_of,omitempty"`
}

func (MockData) MarshalJSON

func (m MockData) MarshalJSON() ([]byte, error)

func (*MockData) UnmarshalJSON

func (m *MockData) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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