From 860759448ded4b9b0c3581d4c1d2ef2a03655aaf Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Fri, 11 Mar 2022 09:06:00 +0000 Subject: [PATCH] Fix ./ci to be workdir-independent Signed-off-by: Solomon Hykes --- ci/cue.mod/pkg/dagger.io | 1 - ci/cue.mod/pkg/universe.dagger.io | 1 - ci/main.cue | 12 ++---------- {ci/cue.mod => cue.mod}/module.cue | 0 cue.mod/pkg | 1 + source.cue | 15 +++++++++++++++ 6 files changed, 18 insertions(+), 12 deletions(-) delete mode 120000 ci/cue.mod/pkg/dagger.io delete mode 120000 ci/cue.mod/pkg/universe.dagger.io rename {ci/cue.mod => cue.mod}/module.cue (100%) create mode 120000 cue.mod/pkg create mode 100644 source.cue diff --git a/ci/cue.mod/pkg/dagger.io b/ci/cue.mod/pkg/dagger.io deleted file mode 120000 index 61c69ed9..00000000 --- a/ci/cue.mod/pkg/dagger.io +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/dagger.io \ No newline at end of file diff --git a/ci/cue.mod/pkg/universe.dagger.io b/ci/cue.mod/pkg/universe.dagger.io deleted file mode 120000 index 9b1eece6..00000000 --- a/ci/cue.mod/pkg/universe.dagger.io +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/universe.dagger.io \ No newline at end of file diff --git a/ci/main.cue b/ci/main.cue index a80281fa..798f5ccc 100644 --- a/ci/main.cue +++ b/ci/main.cue @@ -13,15 +13,7 @@ dagger.#Plan & { // platform: "linux/aarch64" platform: "linux/amd64" - client: filesystem: { - "../": read: exclude: [ - "ci", - "node_modules", - "cmd/dagger/dagger", - "cmd/dagger/dagger-debug", - ] - "./build": write: contents: actions.build.export.directories["/build"] - } + client: filesystem: "./build": write: contents: actions.build.export.directories["/build"] actions: { _mountGoCache: { @@ -36,7 +28,7 @@ dagger.#Plan & { _mountSourceCode: { mounts: "dagger source code": { - contents: client.filesystem."../".read.contents + contents: _source.output dest: "/usr/src/dagger" } workdir: mounts["dagger source code"].dest diff --git a/ci/cue.mod/module.cue b/cue.mod/module.cue similarity index 100% rename from ci/cue.mod/module.cue rename to cue.mod/module.cue diff --git a/cue.mod/pkg b/cue.mod/pkg new file mode 120000 index 00000000..43942700 --- /dev/null +++ b/cue.mod/pkg @@ -0,0 +1 @@ +../pkg \ No newline at end of file diff --git a/source.cue b/source.cue new file mode 100644 index 00000000..157626c4 --- /dev/null +++ b/source.cue @@ -0,0 +1,15 @@ +package main + +import ( + "dagger.io/dagger" +) + +_source: dagger.#Source & { + path: "." + exclude: [ + "ci", + "node_modules", + "cmd/dagger/dagger", + "cmd/dagger/dagger-debug", + ] +}