in fast-build-update-tool/internal/runner/instance_progress_writer.go [47:66]
func (i *InstanceProgressWriter) UpdateState(newState InstanceUpdateState) {
if i.verbose {
return
}
// Calculate the amount to update the progress bar
diff := newState - i.instanceUpdateState
// Update the state and title with the new state
i.instanceUpdateState = newState
i.progressBar.UpdateTitle(stateString(i.instanceId, i.instanceIp, i.instanceUpdateState))
// Actually update the progress bar (do this last, otherwise it causes display issues)
i.progressBar.Add(int(diff))
// If we're at the end, show a nice notice the to the user
if newState == UpdateStateCount {
pterm.Success.Println(i.instanceId)
}
}