<project-ref>+my-target
<project-ref>+my-target/my-artifact.bin
<project-ref>+MY_COMMAND
github.com/foo/bar
, ./my/local/path
<project-ref>+<target>
+my-target
).+build
./js+deps
github.com/earthly/earthly:v0.1.0+earthly
earthly+for-linux
<target-ref>/<artifact-path>
+build/my-artifact
+build/some/artifact/deep/in/a/dir
./js+build/dist
github.com/earthly/earthly:v0.1.0+earthly/earthly
FROM
command takes an image reference. While a BUILD
command takes a target reference.<project-ref>+<command>
+MY_COMMAND
).+COMPILE
./js+NPM_INSTALL
github.com/earthly/earthly:v0.1.0+DOWNLOAD_DIND
+<target-name>
+<target-name>/<artifact-path>
+<command-name>
+build
+build/out.bin
+COMPILE
+
. It must always start with either ./
, ../
or /
, on any operating system (including Windows). Example:./path/to/another/dir
./path/to/another/dir+<target-name>
./path/to/another/dir+<target-name>/<artifact-path>
./path/to/another/dir+<command-name>
./js
./js+build
./js+build/out.bin
./js+COMPILE
<vendor>/<namespace>/<project>/path/in/project[:some-tag]
<vendor>/<namespace>/<project>/path/in/project[:some-tag]+<target-name>
<vendor>/<namespace>/<project>/path/in/project[:some-tag]+<target-name>/<artifact-path>
<vendor>/<namespace>/<project>/path/in/project[:some-tag]+<command-name>
github.com/earthly/earthly/buildkitd
github.com/earthly/earthly/buildkitd+build
github.com/earthly/earthly/buildkitd+build/out.bin
github.com/earthly/earthly/buildkitd+COMPILE
github.com/earthly/earthly:v0.1.0
github.com/earthly/earthly:v0.1.0+build
github.com/earthly/earthly:v0.1.0+build/out.bin
github.com/earthly/earthly:v0.1.0+COMPILE
IMPORT
command, which helps resolve the reference to a full project reference of the types above.IMPORT <full-project-ref> AS <import-alias>
<import-alias>
<import-alias>+<target-name>
<import-alias>+<target-name>/<artifact-path>
<import-alias>+<command-name>
IMPORT github.com/earthly/earthly/buildkitd
buildkitd
buildkitd+build
buildkitd+build/out.bin
buildkitd+COMPILE
IMPORT github.com/earthly/earthly:v0.1.0
earthly
earthly+build
earthly+build/out.bin
earthly+COMPILE
base
. All other target implicitly inherit from base
. You can imagine that all recipes start with an implicit FROM +base
+build
target could have the canonical form github.com/some-user/some-project/some/deep/dir:master+build
, where github.com/some-user/some-project
was inferred as the Git location, based on the Git remote called origin
, and /some/deep/dir
was inferred as the sub-directory where +build
exists within that repository. The Earthly tag is inferred using the following algorithm: