From 74d3bb81cb2aefa59e43d448d33881a15ee754fc Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Fri, 19 Feb 2021 01:25:53 -0800 Subject: [PATCH] examples: dogfood! Signed-off-by: Andrea Luzzardi --- examples/dogfood/main.cue | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 examples/dogfood/main.cue diff --git a/examples/dogfood/main.cue b/examples/dogfood/main.cue new file mode 100644 index 00000000..486a3c03 --- /dev/null +++ b/examples/dogfood/main.cue @@ -0,0 +1,24 @@ +package main + +import ( + "dagger.io/dagger" + "dagger.io/go" +) + +repository: dagger.#Dir // Use `--input-dir repository=.` from the root directory of the project + +build: go.#Build & { + source: repository + packages: "./cmd/dagger" + output: "/usr/local/bin/dagger" +} + +test: go.#Test & { + source: repository + packages: "./..." +} + +help: #dagger: compute: [ + dagger.#Load & {from: build}, + dagger.#Exec & {args: ["dagger", "-h"]}, +]