Make engine.#Scratch a specialization of #FS, rather than a task

Signed-off-by: Joel Longtine <joel@dagger.io>
This commit is contained in:
Joel Longtine
2022-01-07 15:43:58 -07:00
parent 80a42be174
commit 3003b31be3
10 changed files with 15 additions and 41 deletions

View File

@@ -49,11 +49,7 @@ package engine
}
// Produce an empty directory
#Scratch: {
$dagger: task: _name: "Scratch"
output: #FS
}
#Scratch: {$dagger: fs: _id: null}
// Copy files from one FS tree to another
#Copy: {

View File

@@ -7,7 +7,7 @@ package engine
// - A directory containing binary artifacts
// Rule of thumb: if it fits in a tar archive, it fits in a #FS.
#FS: {
$dagger: fs: _id: string
$dagger: fs: _id: string | null
}
// A reference to an external secret, for example:

View File

@@ -16,12 +16,9 @@ import (
// Subdirectory tree
output: #FS & copy.output
// Base image
scratch: engine.#Scratch
// Copy action
copy: engine.#Copy & {
"input": scratch.output
"input": engine.#Scratch
source: {
root: input
"path": path