parent
							
								
									81d796c167
								
							
						
					
					
						commit
						c5bc932ba2
					
				
							
								
								
									
										20
									
								
								main.go
								
								
								
								
							
							
						
						
									
										20
									
								
								main.go
								
								
								
								
							|  | @ -412,6 +412,10 @@ Do you really want to apply? | ||||||
| 					Value: "", | 					Value: "", | ||||||
| 					Usage: "pass args to helm exec", | 					Usage: "pass args to helm exec", | ||||||
| 				}, | 				}, | ||||||
|  | 				cli.BoolFlag{ | ||||||
|  | 					Name:  "auto-approve", | ||||||
|  | 					Usage: "Skip interactive approval before deleting", | ||||||
|  | 				}, | ||||||
| 				cli.BoolFlag{ | 				cli.BoolFlag{ | ||||||
| 					Name:  "purge", | 					Name:  "purge", | ||||||
| 					Usage: "purge releases i.e. free release names and histories", | 					Usage: "purge releases i.e. free release names and histories", | ||||||
|  | @ -430,7 +434,23 @@ Do you really want to apply? | ||||||
| 						helm.SetHelmBinary(c.GlobalString("helm-binary")) | 						helm.SetHelmBinary(c.GlobalString("helm-binary")) | ||||||
| 					} | 					} | ||||||
| 
 | 
 | ||||||
|  | 					names := make([]string, len(state.Releases)) | ||||||
|  | 					for i, r := range state.Releases { | ||||||
|  | 						names[i] = fmt.Sprintf("  %s (%s)", r.Name, r.Chart) | ||||||
|  | 					} | ||||||
|  | 
 | ||||||
|  | 					msg := fmt.Sprintf(`Affected releases are: | ||||||
|  | %s | ||||||
|  | 
 | ||||||
|  | Do you really want to delete? | ||||||
|  |   Helmfile will delete all your releases, as shown above. | ||||||
|  | 
 | ||||||
|  | `, strings.Join(names, "\n")) | ||||||
|  | 					autoApprove := c.Bool("auto-approve") | ||||||
|  | 					if autoApprove || !autoApprove && askForConfirmation(msg) { | ||||||
| 						return state.DeleteReleases(helm, purge) | 						return state.DeleteReleases(helm, purge) | ||||||
|  | 					} | ||||||
|  | 					return nil | ||||||
| 				}) | 				}) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue