Fix engine to don't write architecture in values.yaml if no one provided.

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-10-30 12:07:33 +02:00
parent 0839cfd1d0
commit 4a461a0021
3 changed files with 18 additions and 20 deletions

View File

@@ -10,8 +10,6 @@ import (
"path/filepath"
"strings"
"github.com/containerd/containerd/platforms"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/rs/zerolog/log"
"go.dagger.io/dagger/keychain"
"go.dagger.io/dagger/stdlib"
@@ -184,10 +182,6 @@ func (w *Project) Get(ctx context.Context, name string) (*State, error) {
}
st.Project = w.Path
if st.Architecture == "" {
st.Architecture = platforms.DefaultString()
}
computed, err := os.ReadFile(path.Join(envPath, stateDir, computedFile))
if err == nil {
st.Computed = string(computed)
@@ -263,10 +257,6 @@ func (w *Project) Create(ctx context.Context, name string, plan Plan, arch strin
manifestPath := path.Join(envPath, manifestFile)
if arch == "" {
arch = platforms.Format(specs.Platform{OS: "linux", Architecture: "amd64"})
}
st := &State{
Path: envPath,
Project: w.Path,