Merge pull request #724 from aluzzardi/fix-cue.mod
universe: add cue.mod
This commit is contained in:
commit
36cf20ae2d
@ -333,7 +333,7 @@ func walkStdlib(ctx context.Context, output, format string) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if p == "." || !d.IsDir() {
|
if p == "." || !d.IsDir() || d.Name() == "cue.mod" {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
../../stdlib
|
|
@ -13,12 +13,12 @@ err: ""
|
|||||||
universe: dagger.#Input & dagger.#Artifact
|
universe: dagger.#Input & dagger.#Artifact
|
||||||
|
|
||||||
ctr: #CueCLI & {
|
ctr: #CueCLI & {
|
||||||
vendor: "alpha.dagger.io": universe
|
ctx: universe
|
||||||
command: """
|
command: """
|
||||||
(
|
(
|
||||||
find . -name '*.cue' -print0 | xargs -0iX dirname X | sort -u | {
|
find . -name '*.cue' -print0 | xargs -0iX dirname X | sort -u | {
|
||||||
|
|
||||||
while read -r dir; do
|
while read -r dir; do
|
||||||
|
[ "$(basename $dir)" = "cue.mod" ] && continue
|
||||||
echo "--- $dir"
|
echo "--- $dir"
|
||||||
cue eval "$dir" >/dev/null
|
cue eval "$dir" >/dev/null
|
||||||
done
|
done
|
||||||
@ -39,6 +39,7 @@ err: (os.#File & {
|
|||||||
|
|
||||||
#CueCLI: {
|
#CueCLI: {
|
||||||
command: string
|
command: string
|
||||||
|
ctx: dagger.#Artifact
|
||||||
vendor: [name=string]: dagger.#Artifact
|
vendor: [name=string]: dagger.#Artifact
|
||||||
|
|
||||||
ctr: os.#Container & {
|
ctr: os.#Container & {
|
||||||
@ -58,6 +59,7 @@ err: (os.#File & {
|
|||||||
rm -fr ./*
|
rm -fr ./*
|
||||||
""",
|
""",
|
||||||
]
|
]
|
||||||
|
mount: "/ctx": from: ctx
|
||||||
for name, dir in vendor {
|
for name, dir in vendor {
|
||||||
mount: "/ctx/cue.mod/pkg/\(name)": from: dir
|
mount: "/ctx/cue.mod/pkg/\(name)": from: dir
|
||||||
}
|
}
|
||||||
|
1
stdlib/cue.mod/module.cue
Normal file
1
stdlib/cue.mod/module.cue
Normal file
@ -0,0 +1 @@
|
|||||||
|
module: "alpha.dagger.io"
|
Reference in New Issue
Block a user