reserved

package
v0.8.18 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package reserved identifies and manages earth's reserved, built-in variables and constants.

Index

Constants

View Source
const (
	// Prefix is the current prefix for Earthly-specific built-in ARGs.
	Prefix = "EARTH_"

	// DeprecatedPrefix is the legacy prefix for Earthly-specific built-in ARGs.
	// Built-in ARGs using this prefix are deprecated in favour of Prefix.
	DeprecatedPrefix = "EARTHLY_"
)
View Source
const (
	EarthGitAuthor                  = "EARTH_GIT_AUTHOR"
	EarthGitAuthorEmail             = "EARTH_GIT_AUTHOR_EMAIL"
	EarthGitAuthorName              = "EARTH_GIT_AUTHOR_NAME"
	EarthGitBranch                  = "EARTH_GIT_BRANCH"
	EarthGitCoAuthors               = "EARTH_GIT_CO_AUTHORS"
	EarthGitCommitAuthorTimestamp   = "EARTH_GIT_COMMIT_AUTHOR_TIMESTAMP"
	EarthGitCommitTimestamp         = "EARTH_GIT_COMMIT_TIMESTAMP"
	EarthGitContentHash             = "EARTH_GIT_CONTENT_HASH"
	EarthGitHash                    = "EARTH_GIT_HASH"
	EarthGitOriginURL               = "EARTH_GIT_ORIGIN_URL"
	EarthGitOriginURLScrubbed       = "EARTH_GIT_ORIGIN_URL_SCRUBBED"
	EarthGitProjectName             = "EARTH_GIT_PROJECT_NAME"
	EarthGitRefs                    = "EARTH_GIT_REFS"
	EarthGitShortHash               = "EARTH_GIT_SHORT_HASH"
	EarthGitTag                     = "EARTH_GIT_TAG"
	EarthSourceDateEpoch            = "EARTH_SOURCE_DATE_EPOCH"
	EarthBuildSha                   = "EARTH_BUILD_SHA"
	EarthLocally                    = "EARTH_LOCALLY"
	EarthPush                       = "EARTH_PUSH"
	EarthCI                         = "EARTH_CI"
	EarthCIRunner                   = "EARTH_CI_RUNNER"
	EarthTarget                     = "EARTH_TARGET"
	EarthTargetName                 = "EARTH_TARGET_NAME"
	EarthTargetProject              = "EARTH_TARGET_PROJECT"
	EarthTargetProjectNoTag         = "EARTH_TARGET_PROJECT_NO_TAG"
	EarthTargetTag                  = "EARTH_TARGET_TAG"
	EarthTargetTagDocker            = "EARTH_TARGET_TAG_DOCKER"
	EarthVersion                    = "EARTH_VERSION"
	EarthlyBuildSha                 = "EARTHLY_BUILD_SHA"
	EarthlyGitBranch                = "EARTHLY_GIT_BRANCH"
	EarthlyGitCommitTimestamp       = "EARTHLY_GIT_COMMIT_TIMESTAMP"
	EarthlyGitCommitAuthorTimestamp = "EARTHLY_GIT_COMMIT_AUTHOR_TIMESTAMP"
	EarthlyGitHash                  = "EARTHLY_GIT_HASH"
	EarthlyGitOriginURL             = "EARTHLY_GIT_ORIGIN_URL"
	EarthlyGitOriginURLScrubbed     = "EARTHLY_GIT_ORIGIN_URL_SCRUBBED"
	EarthlyGitProjectName           = "EARTHLY_GIT_PROJECT_NAME"
	EarthlyGitAuthor                = "EARTHLY_GIT_AUTHOR"
	EarthlyGitAuthorEmail           = "EARTHLY_GIT_AUTHOR_EMAIL"
	EarthlyGitAuthorName            = "EARTHLY_GIT_AUTHOR_NAME"
	EarthlyGitCoAuthors             = "EARTHLY_GIT_CO_AUTHORS"
	EarthlyGitShortHash             = "EARTHLY_GIT_SHORT_HASH"
	EarthlyGitTag                   = "EARTHLY_GIT_TAG"
	EarthlyGitRefs                  = "EARTHLY_GIT_REFS"
	EarthlyLocally                  = "EARTHLY_LOCALLY"
	EarthlyPush                     = "EARTHLY_PUSH"
	EarthlyCI                       = "EARTHLY_CI"
	EarthlyCIRunner                 = "EARTHLY_CI_RUNNER"
	EarthlySourceDateEpoch          = "EARTHLY_SOURCE_DATE_EPOCH"
	EarthlyTarget                   = "EARTHLY_TARGET"
	EarthlyTargetName               = "EARTHLY_TARGET_NAME"
	EarthlyTargetProject            = "EARTHLY_TARGET_PROJECT"
	EarthlyTargetProjectNoTag       = "EARTHLY_TARGET_PROJECT_NO_TAG"
	EarthlyTargetTag                = "EARTHLY_TARGET_TAG"
	EarthlyTargetTagDocker          = "EARTHLY_TARGET_TAG_DOCKER"
	EarthlyVersion                  = "EARTHLY_VERSION"
	NativeArch                      = "NATIVEARCH"
	NativeOS                        = "NATIVEOS"
	NativePlatform                  = "NATIVEPLATFORM"
	NativeVariant                   = "NATIVEVARIANT"
	TargetArch                      = "TARGETARCH"
	TargetOS                        = "TARGETOS"
	TargetPlatform                  = "TARGETPLATFORM"
	TargetVariant                   = "TARGETVARIANT"
	UserArch                        = "USERARCH"
	UserOS                          = "USEROS"
	UserPlatform                    = "USERPLATFORM"
	UserVariant                     = "USERVARIANT"
)

Git-related constants that are used in build manifests.

Variables

This section is empty.

Functions

func DeprecatedBuiltin added in v0.8.18

func DeprecatedBuiltin(name string) (replacement string, deprecated bool)

DeprecatedBuiltin reports whether name is a deprecated EARTHLY_-prefixed built-in ARG. When it is, replacement holds the EARTH_-prefixed built-in ARG that supersedes it.

Only names that are both a recognised built-in and have a recognised EARTH_ equivalent are reported, so callers can safely point users at replacement.

func IsBuiltIn

func IsBuiltIn(s string) bool

IsBuiltIn returns true if s is the name of a builtin arg.

Types

This section is empty.

Jump to

Keyboard shortcuts

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