Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ Once you have a `score.yaml` file created, modify it by following [this guide](h
The generate command will convert Score files in the current Score compose project into a combined Docker compose
manifest. All resources and links between Workloads will be resolved and provisioned as required.

By default this command looks for score.yaml in the current directory, but can take explicit file names as positional
arguments.

"score-compose init" MUST be run first. An error will be thrown if the project directory is not present.

Usage:
Expand All @@ -157,7 +154,7 @@ Examples:
# Specify Score files
score-compose generate score.yaml *.score.yaml

# Regenerate without adding new score files
# Regenerate without adding new score files (this command should have been previously executed with at least one score file)
score-compose generate

# Provide overrides when one score file is provided
Expand Down
4 changes: 2 additions & 2 deletions internal/command/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ arguments.
}

if len(currentState.Workloads) == 0 {
return fmt.Errorf("the project is empty, please provide a score file to generate from")
return fmt.Errorf("No workloads found, please provide a score file to generate from.")
}

loadedProvisioners, err := provloader.LoadProvisionersFromDirectory(sd.Path, provloader.DefaultSuffix)
Expand Down Expand Up @@ -523,4 +523,4 @@ func injectWaitService(p *types.Project) (string, bool) {
}
p.Services[newService.Name] = newService
return newService.Name, true
}
}
2 changes: 1 addition & 1 deletion internal/command/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func TestGenerateWithoutScoreFiles(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "", stdout)
stdout, _, err = executeAndResetCommand(context.Background(), rootCmd, []string{"generate"})
assert.EqualError(t, err, "the project is empty, please provide a score file to generate from")
assert.EqualError(t, err, "No workloads found, please provide a score file to generate from.")
assert.Equal(t, "", stdout)
}

Expand Down