diff --git a/Earthfile b/Earthfile index b1f9b62a2..d345e91dd 100644 --- a/Earthfile +++ b/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 diff --git a/actions/configure-runner/Earthfile b/actions/configure-runner/Earthfile index ed8fe45d8..c5574ef25 100644 --- a/actions/configure-runner/Earthfile +++ b/actions/configure-runner/Earthfile @@ -1,4 +1,4 @@ -VERSION --global-cache 0.7 +VERSION 0.8 deps: FROM node:20-bookworm diff --git a/actions/discover/Earthfile b/actions/discover/Earthfile index ed8fe45d8..c5574ef25 100644 --- a/actions/discover/Earthfile +++ b/actions/discover/Earthfile @@ -1,4 +1,4 @@ -VERSION --global-cache 0.7 +VERSION 0.8 deps: FROM node:20-bookworm diff --git a/actions/install/Earthfile b/actions/install/Earthfile index ed8fe45d8..c5574ef25 100644 --- a/actions/install/Earthfile +++ b/actions/install/Earthfile @@ -1,4 +1,4 @@ -VERSION --global-cache 0.7 +VERSION 0.8 deps: FROM node:20-bookworm diff --git a/actions/merge/Earthfile b/actions/merge/Earthfile index ed8fe45d8..c5574ef25 100644 --- a/actions/merge/Earthfile +++ b/actions/merge/Earthfile @@ -1,4 +1,4 @@ -VERSION --global-cache 0.7 +VERSION 0.8 deps: FROM node:20-bookworm diff --git a/actions/push/Earthfile b/actions/push/Earthfile index ed8fe45d8..c5574ef25 100644 --- a/actions/push/Earthfile +++ b/actions/push/Earthfile @@ -1,4 +1,4 @@ -VERSION --global-cache 0.7 +VERSION 0.8 deps: FROM node:20-bookworm diff --git a/actions/run/Earthfile b/actions/run/Earthfile index ed8fe45d8..c5574ef25 100644 --- a/actions/run/Earthfile +++ b/actions/run/Earthfile @@ -1,4 +1,4 @@ -VERSION --global-cache 0.7 +VERSION 0.8 deps: FROM node:20-bookworm diff --git a/cli/Earthfile b/cli/Earthfile index d113cb663..fdb2c5339 100644 --- a/cli/Earthfile +++ b/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 @@ -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 @@ -36,7 +38,7 @@ build: test: FROM +build - + RUN ginkgo ./... release: diff --git a/cli/cmd/main.go b/cli/cmd/main.go index 47184dde6..1d8eee89b 100644 --- a/cli/cmd/main.go +++ b/cli/cmd/main.go @@ -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. diff --git a/cli/go.mod b/cli/go.mod index 0cf83a22b..2344f914d 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -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 ) diff --git a/cli/go.sum b/cli/go.sum index c00f6465b..8db3848a6 100644 --- a/cli/go.sum +++ b/cli/go.sum @@ -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= @@ -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= @@ -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= @@ -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= @@ -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= @@ -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= @@ -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= @@ -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= diff --git a/docs/Earthfile b/docs/Earthfile index 2960220c1..98a9111e3 100644 --- a/docs/Earthfile +++ b/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: diff --git a/docs/src/appendix/earthly.md b/docs/src/appendix/earthly.md index 46a8ca2f1..f80a16496 100644 --- a/docs/src/appendix/earthly.md +++ b/docs/src/appendix/earthly.md @@ -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: @@ -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 @@ -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 diff --git a/docs/src/guides/docs.md b/docs/src/guides/docs.md index 890cc27e4..79aa9778f 100644 --- a/docs/src/guides/docs.md +++ b/docs/src/guides/docs.md @@ -39,7 +39,7 @@ This folder already has an `Earthfile` in it, which contains all build process. ```Earthfile -VERSION --global-cache 0.7 +VERSION 0.8 # Copy all the source we need to build the docs src: diff --git a/docs/src/guides/languages/go.md b/docs/src/guides/languages/go.md index 0668d7302..66ed193d5 100644 --- a/docs/src/guides/languages/go.md +++ b/docs/src/guides/languages/go.md @@ -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. diff --git a/docs/src/guides/languages/postgresql.md b/docs/src/guides/languages/postgresql.md index 700c913ba..8da570c18 100644 --- a/docs/src/guides/languages/postgresql.md +++ b/docs/src/guides/languages/postgresql.md @@ -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 diff --git a/docs/src/guides/languages/python.md b/docs/src/guides/languages/python.md index b6ae6e6a5..b2918b000 100644 --- a/docs/src/guides/languages/python.md +++ b/docs/src/guides/languages/python.md @@ -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 diff --git a/docs/src/guides/languages/rust.md b/docs/src/guides/languages/rust.md index a54eb215e..52d3c22a5 100644 --- a/docs/src/guides/languages/rust.md +++ b/docs/src/guides/languages/rust.md @@ -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: diff --git a/docs/src/guides/simulate.md b/docs/src/guides/simulate.md index b6e775e1e..b50c6bc15 100644 --- a/docs/src/guides/simulate.md +++ b/docs/src/guides/simulate.md @@ -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 @@ -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` diff --git a/docs/src/style/index.md b/docs/src/style/index.md index 297bba46a..6e570e01d 100644 --- a/docs/src/style/index.md +++ b/docs/src/style/index.md @@ -12,14 +12,6 @@ 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. - -!!! 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. - - ## Organization ### Adhere to a consistent structure @@ -27,7 +19,7 @@ Any `Earthfile` which does not adhere to this style guide will be rejected if no 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 @@ -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 ``` @@ -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 diff --git a/earthly/bash/Earthfile b/earthly/bash/Earthfile index 189a2d70e..a0ff26dec 100644 --- a/earthly/bash/Earthfile +++ b/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: diff --git a/earthly/cspell/Earthfile b/earthly/cspell/Earthfile index 8ef1fb488..65db2c178 100644 --- a/earthly/cspell/Earthfile +++ b/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 diff --git a/earthly/docs/Earthfile b/earthly/docs/Earthfile index 7097fdd53..e749766e2 100644 --- a/earthly/docs/Earthfile +++ b/earthly/docs/Earthfile @@ -1,4 +1,5 @@ -VERSION --global-cache --use-function-keyword 0.7 +VERSION 0.8 + # cspell: words freetype lcms openjpeg etag @@ -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 diff --git a/earthly/go/Earthfile b/earthly/go/Earthfile index df5c8e5e2..a07fec6d6 100644 --- a/earthly/go/Earthfile +++ b/earthly/go/Earthfile @@ -1,4 +1,4 @@ -VERSION --global-cache --use-function-keyword 0.7 +VERSION 0.8 DEPS: FUNCTION diff --git a/earthly/mdlint/Earthfile b/earthly/mdlint/Earthfile index edb0555f4..89c3449a3 100644 --- a/earthly/mdlint/Earthfile +++ b/earthly/mdlint/Earthfile @@ -1,8 +1,9 @@ -VERSION --global-cache --use-function-keyword 0.7 +VERSION 0.8 + # cspell: words markdownlint MDLINT_LOCALLY: - # DO NOT RUN THIS UDC INSIDE CONTAINER BUILDS. + # DO NOT RUN THIS FUNCTION INSIDE CONTAINER BUILDS. # IT IS NOT FOR CONTAINER BUILDS. # See: https://github.com/earthly/earthly/issues/580 @@ -41,7 +42,7 @@ MDLINT_LOCALLY: # Markdown check used in standard CI target check. CHECK: - # DO NOT RUN THIS UDC INSIDE CONTAINER BUILDS. + # DO NOT RUN THIS FUNCTION INSIDE CONTAINER BUILDS. # IT IS NOT FOR CONTAINER BUILDS. # See: https://github.com/earthly/earthly/issues/580 @@ -74,7 +75,7 @@ CHECK: "**/*.md" \ --config $cfg_file -# A Test and example invocation of the above UDC. +# A Test and example invocation of the above FUNCTION. mdlint-test: # Test Markdown lint checks. # Run with `earthly -P +mdlint-test diff --git a/earthly/postgresql/Earthfile b/earthly/postgresql/Earthfile index b61e33fd9..e263722ac 100644 --- a/earthly/postgresql/Earthfile +++ b/earthly/postgresql/Earthfile @@ -1,5 +1,6 @@ # Common PostgreSQL Earthly builders -VERSION --global-cache --use-function-keyword 0.7 +VERSION 0.8 + # cspell: words psycopg dbviz @@ -72,7 +73,7 @@ BUILDER: COPY --dir $seed . COPY --dir $refinery_toml . -# DOCS - UDC to build the docs, needs to be run INSIDE the BUILDER like so: +# DOCS - FUNCTION to build the docs, needs to be run INSIDE the BUILDER like so: # # 1. Create a ./docs/diagrams.json which has the options needed to run to generate the docs to /docs # 2. Define the following targets in your earthfile diff --git a/earthly/python/Earthfile b/earthly/python/Earthfile index 254e6d158..e67b6de45 100644 --- a/earthly/python/Earthfile +++ b/earthly/python/Earthfile @@ -1,5 +1,6 @@ # Common Python UDCs and Builders. -VERSION --global-cache --use-function-keyword 0.7 +VERSION 0.8 + # cspell: words libgcc ruff diff --git a/earthly/python/Readme.md b/earthly/python/Readme.md index 907e2d8c4..76c9db358 100644 --- a/earthly/python/Readme.md +++ b/earthly/python/Readme.md @@ -7,8 +7,8 @@ This repo defines common python targets and UDCs for use with python. ### POETRY_SETUP -This UDC sets up a python based container that uses poetry for dependency management. -Once the UDC has run, the Earthly target that invoked it will +This FUNCTION sets up a python based container that uses poetry for dependency management. +Once the FUNCTION has run, the Earthly target that invoked it will #### Invocation @@ -27,7 +27,7 @@ You may also pass optional arguments: These arguments are optional and neither is required to be set. -The directory that contains the Earthfile that invokes this UDC MUST have: +The directory that contains the Earthfile that invokes this FUNCTION MUST have: * `pyproject.toml` : Definitions of the project to be installed with Poetry. * `poetry.lock` : Dependency lock file. diff --git a/earthly/rust/Earthfile b/earthly/rust/Earthfile index e0fcd77e7..1cdc259a8 100644 --- a/earthly/rust/Earthfile +++ b/earthly/rust/Earthfile @@ -1,5 +1,5 @@ -# Common Rust UDCs and Builders. -VERSION --global-cache --use-function-keyword 0.7 +VERSION 0.8 + # cspell: words rustup miri ripgrep stdcfgs toolset depgraph lcov psycopg bindgen # cspell: words TARGETPLATFORM TARGETOS TARGETARCH TARGETVARIANT USERPLATFORM USEROS USERARCH USERVARIANT @@ -19,7 +19,7 @@ rust-base: # This is our base Host toolset, and rustup. # The ACTUAL version of rust that will be used, and available targets - # is controlled by a `rust-toolchain.toml` file when the `SETUP` UDC is run. + # is controlled by a `rust-toolchain.toml` file when the `SETUP` FUNCTION is run. # HOWEVER, It is enforced that the rust version in `rust-toolchain.toml` MUST match this version. # WARNING: diff --git a/earthly/rust/Readme.md b/earthly/rust/Readme.md index 61c1a3e0b..d12d4eab5 100644 --- a/earthly/rust/Readme.md +++ b/earthly/rust/Readme.md @@ -8,7 +8,7 @@ This repo defines common rust targets and UDCs for use with rust. ### RUST_SETUP -This UDC sets up a rust build environment. +This FUNCTION sets up a rust build environment. Rust build environments are locked to the `rust-toolchain.toml` file in the repo. This ensures that the version of the toolchain used is locked with the dependencies. diff --git a/earthly/spectral/Earthfile b/earthly/spectral/Earthfile index 3af151ab7..168468658 100644 --- a/earthly/spectral/Earthfile +++ b/earthly/spectral/Earthfile @@ -1,4 +1,4 @@ -VERSION --global-cache --use-function-keyword 0.7 +VERSION 0.8 # cspell: words ruleset diff --git a/earthly/wasm/c/Earthfile b/earthly/wasm/c/Earthfile index f2c1c2ca9..70795edd4 100644 --- a/earthly/wasm/c/Earthfile +++ b/earthly/wasm/c/Earthfile @@ -1,4 +1,4 @@ -VERSION --global-cache --use-function-keyword 0.7 +VERSION 0.8 # cspell: words bindgen autodrop mexec diff --git a/examples/go/Earthfile b/examples/go/Earthfile index 4e49e9df7..a547fd0f9 100644 --- a/examples/go/Earthfile +++ b/examples/go/Earthfile @@ -1,6 +1,6 @@ # WARNING: If you modify this file, please update the guide that it is dependent # on in docs/guides/languages/go.md. -VERSION --global-cache --use-function-keyword 0.7 +VERSION 0.8 # The structure of this Earthfile is derived from the style guide: # https://input-output-hk.github.io/catalyst-ci/style/#adhere-to-a-consistent-structure @@ -13,7 +13,7 @@ deps: # Any build dependencies should also be captured in this target. RUN apk add --no-cache gcc musl-dev - # This UDC automatically copies the go.mod and go.sum files and runs + # This FUNCTION automatically copies the go.mod and go.sum files and runs # `go mod download` to install the dependencies. DO ../../earthly/go+DEPS --ginkgo="false" @@ -27,10 +27,10 @@ check: # This target checks the overall health of the source code. FROM +src - # This UDC validates the code is formatted according to Go standards. + # This FUNCTION validates the code is formatted according to Go standards. DO ../../earthly/go+FMT --src="go.mod go.sum cmd" - # This UDC runs golangci-lint to check for common errors. + # This FUNCTION runs golangci-lint to check for common errors. DO ../../earthly/go+LINT --src="go.mod go.sum cmd" build: diff --git a/examples/postgresql/Earthfile b/examples/postgresql/Earthfile index c0252101d..d27346c24 100644 --- a/examples/postgresql/Earthfile +++ b/examples/postgresql/Earthfile @@ -1,4 +1,4 @@ -VERSION --global-cache --use-function-keyword 0.7 +VERSION 0.8 # cspell: words psql diff --git a/examples/python/Earthfile b/examples/python/Earthfile index 120ad71db..bcbdc561d 100644 --- a/examples/python/Earthfile +++ b/examples/python/Earthfile @@ -1,5 +1,4 @@ -# Common Python UDCs and Builders. -VERSION --global-cache --use-function-keyword 0.7 +VERSION 0.8 # Assuming the detailed setup from the second snippet is defined in relevant Earthly targets. diff --git a/examples/rust/Earthfile b/examples/rust/Earthfile index a80ae627a..508c53ed5 100644 --- a/examples/rust/Earthfile +++ b/examples/rust/Earthfile @@ -1,4 +1,4 @@ -VERSION --try --global-cache 0.7 +VERSION --try 0.8 # cspell: words USERARCH toolsets diff --git a/examples/wasm/c/Earthfile b/examples/wasm/c/Earthfile index 491f7c478..2e4291692 100644 --- a/examples/wasm/c/Earthfile +++ b/examples/wasm/c/Earthfile @@ -1,4 +1,4 @@ -VERSION --global-cache 0.7 +VERSION 0.8 builder: FROM ./../../../earthly/wasm/c+wasm-c-base diff --git a/services/jorm-metrics-server/Earthfile b/services/jorm-metrics-server/Earthfile index eacbb6735..015681ae7 100644 --- a/services/jorm-metrics-server/Earthfile +++ b/services/jorm-metrics-server/Earthfile @@ -1,4 +1,4 @@ -VERSION 0.7 +VERSION 0.8 deps: FROM python:3.12.1-slim-bookworm diff --git a/tools/fetcher/Earthfile b/tools/fetcher/Earthfile index 90746b251..0b3ce979c 100644 --- a/tools/fetcher/Earthfile +++ b/tools/fetcher/Earthfile @@ -1,4 +1,4 @@ -VERSION 0.7 +VERSION 0.8 FROM golang:1.21-alpine3.19 # cspell: words onsi ldflags extldflags @@ -11,6 +11,7 @@ lint: deps: WORKDIR /work + CACHE --persist --sharing shared /go RUN apk add --no-cache gcc musl-dev DO ../../earthly/go+DEPS diff --git a/tools/updater/Earthfile b/tools/updater/Earthfile index a9c127cc4..1cd7b3fa2 100644 --- a/tools/updater/Earthfile +++ b/tools/updater/Earthfile @@ -1,4 +1,4 @@ -VERSION 0.7 +VERSION 0.8 FROM golang:1.21-alpine3.19 # cspell: words onsi ldflags extldflags @@ -11,6 +11,7 @@ lint: deps: WORKDIR /work + CACHE --persist --sharing shared /go RUN apk add --no-cache gcc musl-dev DO ../../earthly/go+DEPS diff --git a/utilities/dbviz/Earthfile b/utilities/dbviz/Earthfile index f2afb19e3..38eb75b5a 100644 --- a/utilities/dbviz/Earthfile +++ b/utilities/dbviz/Earthfile @@ -1,5 +1,4 @@ -# Common Rust UDCs and Builders. -VERSION --global-cache 0.7 +VERSION 0.8 # cspell: words stdcfgs toolset toolsets diff --git a/utilities/scripts/Earthfile b/utilities/scripts/Earthfile index a52567a91..ccd455f07 100644 --- a/utilities/scripts/Earthfile +++ b/utilities/scripts/Earthfile @@ -1,5 +1,6 @@ # Earthfile containing common scripts for easy reference -VERSION --global-cache --use-function-keyword 0.7 +VERSION 0.8 + # Internal: bash-scripts : Common bash scripts. bash-scripts: @@ -17,13 +18,13 @@ python-scripts: SAVE ARTIFACT /python /python -# UDC to add our common bash scripts to a container image. +# FUNCTION to add our common bash scripts to a container image. ADD_BASH_SCRIPTS: FUNCTION COPY --dir +bash-scripts/include /scripts/include -# UDC to add our common bash scripts to a container image. +# FUNCTION to add our common bash scripts to a container image. ADD_PYTHON_SCRIPTS: FUNCTION