Skip to content

Commit

Permalink
fix: update earthly to 0.8 (#233)
Browse files Browse the repository at this point in the history
* fix: update earthly version to 0.8

* fix: add try flag

* fix: update cli earthly default version

* fix: ginkgo not found

* fix: add cache persist

* fix: update ginkgo

* chore: update docs

* fix: update go sum
  • Loading branch information
bkioshn committed Apr 17, 2024
1 parent 3e1b879 commit a33d3e6
Show file tree
Hide file tree
Showing 42 changed files with 94 additions and 99 deletions.
3 changes: 1 addition & 2 deletions Earthfile
@@ -1,5 +1,4 @@
# Set the Earthly version to 0.7
VERSION --global-cache --use-function-keyword 0.7
VERSION 0.8

# cspell: words livedocs sitedocs

Expand Down
2 changes: 1 addition & 1 deletion actions/configure-runner/Earthfile
@@ -1,4 +1,4 @@
VERSION --global-cache 0.7
VERSION 0.8

deps:
FROM node:20-bookworm
Expand Down
2 changes: 1 addition & 1 deletion actions/discover/Earthfile
@@ -1,4 +1,4 @@
VERSION --global-cache 0.7
VERSION 0.8

deps:
FROM node:20-bookworm
Expand Down
2 changes: 1 addition & 1 deletion actions/install/Earthfile
@@ -1,4 +1,4 @@
VERSION --global-cache 0.7
VERSION 0.8

deps:
FROM node:20-bookworm
Expand Down
2 changes: 1 addition & 1 deletion actions/merge/Earthfile
@@ -1,4 +1,4 @@
VERSION --global-cache 0.7
VERSION 0.8

deps:
FROM node:20-bookworm
Expand Down
2 changes: 1 addition & 1 deletion actions/push/Earthfile
@@ -1,4 +1,4 @@
VERSION --global-cache 0.7
VERSION 0.8

deps:
FROM node:20-bookworm
Expand Down
2 changes: 1 addition & 1 deletion actions/run/Earthfile
@@ -1,4 +1,4 @@
VERSION --global-cache 0.7
VERSION 0.8

deps:
FROM node:20-bookworm
Expand Down
6 changes: 4 additions & 2 deletions cli/Earthfile
@@ -1,4 +1,5 @@
VERSION --global-cache 0.7
VERSION 0.8

FROM golang:1.21-alpine3.19

# cspell: words onsi ldflags extldflags
Expand All @@ -11,6 +12,7 @@ lint:

deps:
WORKDIR /work
CACHE --persist --sharing shared /go

RUN apk add --no-cache gcc musl-dev
DO ../earthly/go+DEPS
Expand All @@ -36,7 +38,7 @@ build:

test:
FROM +build

RUN ginkgo ./...

release:
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/main.go
Expand Up @@ -278,7 +278,7 @@ func runEarthlyTarget(earthlyCmd string) {
type generateCmd struct {
Path string ` help:"directory path to be iterated to search for targets within the Earthfile" arg:"" type:"path"`
Targets []string `short:"t" help:"Earthly targets pattern" default:"check,check-*,build,test,test-*"`
Version string `short:"v" help:"Earthly version" default:"0.7"`
Version string `short:"v" help:"Earthly version" default:"0.8"`
}

// Generate Earthfile with given targets.
Expand Down
16 changes: 8 additions & 8 deletions cli/go.mod
Expand Up @@ -9,25 +9,25 @@ require (
github.com/alecthomas/kong v0.7.1
github.com/aws/aws-sdk-go v1.44.274
github.com/earthly/earthly/ast v0.0.2-0.20240228223838-42e8ca204e8a
github.com/onsi/ginkgo/v2 v2.9.7
github.com/onsi/gomega v1.27.7
github.com/onsi/ginkgo/v2 v2.17.1
github.com/onsi/gomega v1.30.0
github.com/spf13/afero v1.9.5
)

require (
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230219212500-1f9a474cc2dc // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/tools v0.9.1 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.17.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
34 changes: 16 additions & 18 deletions cli/go.sum
Expand Up @@ -73,8 +73,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
Expand Down Expand Up @@ -115,8 +115,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
Expand Down Expand Up @@ -158,10 +158,10 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/onsi/ginkgo/v2 v2.9.7 h1:06xGQy5www2oN160RtEZoTvnP2sPhEfePYmCDc2szss=
github.com/onsi/ginkgo/v2 v2.9.7/go.mod h1:cxrmXWykAwTwhQsJOPfdIDiJ+l2RYq7U8hFU+M/1uw0=
github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU=
github.com/onsi/gomega v1.27.7/go.mod h1:1p8OOlwo2iUUDsHnOrjE5UKYJ+e3W8eQ3qSlRahPmr4=
github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8=
github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
Expand Down Expand Up @@ -233,8 +233,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -269,8 +267,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -329,8 +327,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
Expand All @@ -343,8 +341,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -396,8 +394,8 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=
golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
2 changes: 1 addition & 1 deletion docs/Earthfile
@@ -1,4 +1,4 @@
VERSION --global-cache 0.7
VERSION 0.8

# Copy all the source we need to build the docs
src:
Expand Down
6 changes: 3 additions & 3 deletions docs/src/appendix/earthly.md
Expand Up @@ -75,7 +75,7 @@ Like a `Dockerfile`, only a single `Earthfile` can exist per directory and it *m
#### Sample Structure

```Earthfile
VERSION --global-cache 0.7 # This defines the "schema version" that this Earthfile satisfies
VERSION 0.8 # This defines the "schema version" that this Earthfile satisfies
# A target, which is functionally equivalent to a `makefile` target.
deps:
Expand All @@ -95,7 +95,7 @@ The commands are in all uppercase letters and there's typically only one command

An `Earthfile` always starts by specifying a schema version which informs Earthly how it should go about parsing the file.
This allows the syntax and format of an Earthfile to evolve while maintaining backwards compatibility.
In our case, we target version `0.7` which is the latest version at the time of this writing.
In our case, we target version `0.8` which is the latest version at the time of this writing.

#### Targets

Expand All @@ -104,7 +104,7 @@ A target can be thought of as a grouping of image layers, similar to the way mul
Each target then specifies one or more commands that create the image layers associated with that target.

```Earthfile
VERSION --global-cache 0.7
VERSION 0.8
deps:
FROM golang:1.21-alpine3.19
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guides/docs.md
Expand Up @@ -39,7 +39,7 @@ This folder already has an `Earthfile` in it, which contains all build process.
<!-- markdownlint-enable max-one-sentence-per-line -->

```Earthfile
VERSION --global-cache 0.7
VERSION 0.8
# Copy all the source we need to build the docs
src:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guides/languages/go.md
Expand Up @@ -46,7 +46,7 @@ You can choose to either delete the file and start from scratch, or read the gui
### Installing dependencies

```Earthfile
VERSION --global-cache 0.7
VERSION 0.8
deps:
# This target is used to install external Go dependencies.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guides/languages/postgresql.md
Expand Up @@ -49,7 +49,7 @@ You can choose to either delete the file and start from scratch, or read the gui
### Prepare base builder

```Earthfile
VERSION --global-cache 0.7
VERSION 0.8
builder:
FROM ./../../earthly/postgresql+postgres-base
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guides/languages/python.md
Expand Up @@ -45,7 +45,7 @@ or read the guide and follow along in the file.
### Prepare base builder

```Earthfile
VERSION --global-cache 0.7
VERSION 0.8
builder:
FROM ./../../earthly/python+python-base
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guides/languages/rust.md
Expand Up @@ -49,7 +49,7 @@ Also we will take a look how we are setup Rust projects and what configuration i
### Prepare base builder

```Earthfile
VERSION --global-cache 0.7
VERSION --try 0.8
# Set up our target toolchains, and copy our files.
builder:
Expand Down
4 changes: 2 additions & 2 deletions docs/src/guides/simulate.md
Expand Up @@ -95,7 +95,7 @@ The generateCmd struct is designed to be used with a command-line interface (CLI
* `Target`: A list of Earthly target patterns that the simulation will run.
If the flag is not set, the default pipeline will be run `check check-* build test test-*`
* `Version`: An Earthly version that need to be specify at the top of Earthfile.
The default version is 0.7
The default version is 0.8

### Default value

Expand All @@ -107,7 +107,7 @@ ci generate .
```

The ci will create an Earthfile in `generate/` folder of the current directory.
The version of the Earthly will be set to 0.7
The version of the Earthly will be set to 0.8
The targets will be listed under the `simulate` target.
eg. `BUILD ../test/+target`

Expand Down
14 changes: 3 additions & 11 deletions docs/src/style/index.md
Expand Up @@ -12,22 +12,14 @@ In most circumstances, the standards provided by this style guide should *not* b
If an exception must me made, the rationale should be included in the respective PR.
Any `Earthfile` which does not adhere to this style guide will be rejected if no further justification is made.

<!-- markdownlint-disable max-one-sentence-per-line -->
!!! Warning
UDC (User Defined Commands) will be renamed to FUNCTION in Earthly 0.8.
Earthly 0.7 still uses COMMAND for declaring functions, but
the keyword is deprecated and will be replaced by FUNCTION in
Earthly 0.8. Please refer to [link](https://docs.earthly.dev/docs/guides/functions) for more information.
<!-- markdownlint-enable max-one-sentence-per-line -->

## Organization

### Adhere to a consistent structure

The following structure should be used to provide a consistent structure to `Earthfile`s:

```Earthfile
VERSION --global-cache 0.7 # Should be the same across the repository
VERSION 0.8 # Should be the same across the repository
deps:
FROM <base image>
Expand Down Expand Up @@ -95,7 +87,7 @@ This target is made up of the commands that appear outside of an existing target
For example:

```Earthfile
VERSION --global-cache 0.7
VERSION 0.8
FROM ubuntu:latest # Apart of the base target
WORKDIR /work # Apart of the base target
```
Expand All @@ -112,7 +104,7 @@ As such, the base target should be avoided, and individual targets should be
clear about their intentions:

```Earthfile
VERSION --global-cache 0.7
VERSION 0.8
deps:
FROM ubuntu:latest
Expand Down
4 changes: 2 additions & 2 deletions earthly/bash/Earthfile
@@ -1,5 +1,5 @@
# cspell UDCs and Containers.
VERSION --global-cache --use-function-keyword 0.7
VERSION 0.8


# Internal: builder creates a container we can use to execute shellcheck
builder:
Expand Down
3 changes: 1 addition & 2 deletions earthly/cspell/Earthfile
@@ -1,5 +1,4 @@
# cspell UDCs and Containers.
VERSION --global-cache --use-function-keyword 0.7
VERSION 0.8

CHECK:
# Spell checking all docs and code is done with cspell
Expand Down
5 changes: 3 additions & 2 deletions earthly/docs/Earthfile
@@ -1,4 +1,5 @@
VERSION --global-cache --use-function-keyword 0.7
VERSION 0.8


# cspell: words freetype lcms openjpeg etag

Expand Down Expand Up @@ -117,7 +118,7 @@ PACKAGE:
# Start Nginx when the container is run
CMD ["nginx", "-g", "daemon off;"]

# These steps are done outside the UDC.
# These steps are done outside the FUNCTION.

# Copy the static pages into the container like this...
#COPY $docs /usr/share/nginx/html
Expand Down
2 changes: 1 addition & 1 deletion earthly/go/Earthfile
@@ -1,4 +1,4 @@
VERSION --global-cache --use-function-keyword 0.7
VERSION 0.8

DEPS:
FUNCTION
Expand Down

0 comments on commit a33d3e6

Please sign in to comment.