Skip to content

Commit

Permalink
feat(cmd/rofl): Create an empty compose.yaml on init
Browse files Browse the repository at this point in the history
  • Loading branch information
kostko committed Jan 23, 2025
1 parent f5b68d9 commit 5760f58
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/rofl/mgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ var (
fmt.Printf(" Debug: %v\n", deployment.Debug)
fmt.Printf(" Admin: %s\n", deployment.Admin)

// For container app kind also create an en empty compose.yaml file if it doesn't exist.
if appKind == buildRofl.AppKindContainer {
var f *os.File
f, err = os.OpenFile("compose.yaml", os.O_RDONLY|os.O_CREATE, 0o644)
if err == nil {
f.Close()
}
}

// Serialize manifest and write it to file.
err = manifest.Save()
if err != nil {
Expand Down

0 comments on commit 5760f58

Please sign in to comment.