Update dagger engine to uses a given architecture instead of default one.

Check #1071 for more details

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-10-22 20:52:25 +02:00
parent 428aca1c03
commit caa03a37cc
9 changed files with 63 additions and 25 deletions

View File

@@ -9,6 +9,7 @@ import (
"strings"
"cuelang.org/go/cue"
"github.com/containerd/containerd/platforms"
"go.dagger.io/dagger/cmd/dagger/cmd/common"
"go.dagger.io/dagger/cmd/dagger/logger"
"go.dagger.io/dagger/compiler"
@@ -41,8 +42,9 @@ var computeCmd = &cobra.Command{
doneCh := common.TrackCommand(ctx, cmd)
st := &state.State{
Name: "FIXME",
Path: args[0],
Name: "FIXME",
Architecture: platforms.Format(platforms.DefaultSpec()),
Path: args[0],
Plan: state.Plan{
Module: args[0],
},

View File

@@ -73,6 +73,7 @@ var editCmd = &cobra.Command{
lg.Fatal().Err(err).Msg("failed to decode file")
}
st.Name = newState.Name
st.Architecture = newState.Architecture
st.Plan = newState.Plan
st.Inputs = newState.Inputs