envexport

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvExporter

type EnvExporter struct {
	// contains filtered or unexported fields
}

EnvExporter exports environment variables to the current process and CI-specific mechanisms. It sets os env vars, calls envman (Bitrise CI), and writes to GITHUB_ENV (GitHub Actions).

func New

func New(envs map[string]string, logger log.Logger) *EnvExporter

New creates an EnvExporter. The envs map is used to read CI-specific file paths (e.g. GITHUB_ENV).

func (*EnvExporter) Export

func (e *EnvExporter) Export(key, value string)

Export sets the environment variable in the current process, calls envman for Bitrise CI, and writes to the GITHUB_ENV file for GitHub Actions. All errors are logged as debug and do not fail the caller.

func (*EnvExporter) ExportToShellRC

func (e *EnvExporter) ExportToShellRC(blockName, content string)

ExportToShellRC writes an export statement to ~/.bashrc and ~/.zshrc using a marker block. The blockName identifies the block in the file (e.g. "Bitrise Build Cache"). The content is the raw shell content to write (e.g. "export KEY=VALUE").

Jump to

Keyboard shortcuts

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