Change "arch" into "platform" because it's more accurate.
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
@@ -235,7 +235,7 @@ func (w *Project) Save(ctx context.Context, st *State) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *Project) Create(ctx context.Context, name string, plan Plan, arch string) (*State, error) {
|
||||
func (w *Project) Create(ctx context.Context, name string, plan Plan, platform string) (*State, error) {
|
||||
if _, err := w.Get(ctx, name); err == nil {
|
||||
return nil, ErrExist
|
||||
}
|
||||
@@ -263,8 +263,8 @@ func (w *Project) Create(ctx context.Context, name string, plan Plan, arch strin
|
||||
Plan: Plan{
|
||||
Package: pkg,
|
||||
},
|
||||
Name: name,
|
||||
Architecture: arch,
|
||||
Name: name,
|
||||
Platform: platform,
|
||||
}
|
||||
|
||||
data, err := yaml.Marshal(st)
|
||||
|
@@ -35,7 +35,7 @@ func TestProject(t *testing.T) {
|
||||
}, "linux/amd64")
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "test", st.Name)
|
||||
require.Equal(t, "linux/amd64", st.Architecture)
|
||||
require.Equal(t, "linux/amd64", st.Platform)
|
||||
|
||||
// Open
|
||||
project, err = Open(ctx, root)
|
||||
@@ -52,7 +52,7 @@ func TestProject(t *testing.T) {
|
||||
env, err := project.Get(ctx, "test")
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "test", env.Name)
|
||||
require.Equal(t, "linux/amd64", env.Architecture)
|
||||
require.Equal(t, "linux/amd64", env.Platform)
|
||||
|
||||
// Save
|
||||
require.NoError(t, env.SetInput("foo", TextInput("bar")))
|
||||
|
@@ -24,8 +24,8 @@ type State struct {
|
||||
// FIXME: store multiple names?
|
||||
Name string `yaml:"name,omitempty"`
|
||||
|
||||
// Architecture execution
|
||||
Architecture string `yaml:"architecture,omitempty"`
|
||||
// Platform execution
|
||||
Platform string `yaml:"platform,omitempty"`
|
||||
|
||||
// User Inputs
|
||||
Inputs map[string]Input `yaml:"inputs,omitempty"`
|
||||
|
Reference in New Issue
Block a user