Skip to content
Merged
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
22 changes: 12 additions & 10 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,20 @@ var runCmd = &cobra.Command{
websiteBuildUpdates, err := proj.BuildWebsites(loadEnv)
tui.CheckErr(err)

if isNonInteractive() {
fmt.Println("building project websites")
for update := range websiteBuildUpdates {
for _, line := range strings.Split(strings.TrimSuffix(update.Message, "\n"), "\n") {
fmt.Printf("%s [%s]: %s\n", update.ServiceName, update.Status, line)
if len(proj.GetWebsites()) > 0 {
if isNonInteractive() {
fmt.Println("building project websites")
for update := range websiteBuildUpdates {
for _, line := range strings.Split(strings.TrimSuffix(update.Message, "\n"), "\n") {
fmt.Printf("%s [%s]: %s\n", update.ServiceName, update.Status, line)
}
}
} else {
prog := teax.NewProgram(build.NewModel(websiteBuildUpdates, "Building Websites"))
// blocks but quits once the above updates channel is closed by the build process
_, err = prog.Run()
tui.CheckErr(err)
}
} else {
prog := teax.NewProgram(build.NewModel(websiteBuildUpdates, "Building Websites"))
// blocks but quits once the above updates channel is closed by the build process
_, err = prog.Run()
tui.CheckErr(err)
}

// Run the app code (project services)
Expand Down
22 changes: 12 additions & 10 deletions cmd/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,18 +280,20 @@ var stackUpdateCmd = &cobra.Command{
websiteBuildUpdates, err := proj.BuildWebsites(envVariables)
tui.CheckErr(err)

if isNonInteractive() {
fmt.Println("building project websites")
for update := range websiteBuildUpdates {
for _, line := range strings.Split(strings.TrimSuffix(update.Message, "\n"), "\n") {
fmt.Printf("%s [%s]: %s\n", update.ServiceName, update.Status, line)
if len(proj.GetWebsites()) > 0 {
if isNonInteractive() {
fmt.Println("building project websites")
for update := range websiteBuildUpdates {
for _, line := range strings.Split(strings.TrimSuffix(update.Message, "\n"), "\n") {
fmt.Printf("%s [%s]: %s\n", update.ServiceName, update.Status, line)
}
}
} else {
prog := teax.NewProgram(build.NewModel(websiteBuildUpdates, "Building Websites"))
// blocks but quits once the above updates channel is closed by the build process
_, err = prog.Run()
tui.CheckErr(err)
}
} else {
prog := teax.NewProgram(build.NewModel(websiteBuildUpdates, "Building Websites"))
// blocks but quits once the above updates channel is closed by the build process
_, err = prog.Run()
tui.CheckErr(err)
}

providerStdout := make(chan string)
Expand Down