feat: unique stages names
This commit is contained in:
		
							parent
							
								
									d76fe99811
								
							
						
					
					
						commit
						0b248aad6b
					
				|  | @ -34,10 +34,16 @@ func getCommitMsg() (msg string, err error) { | ||||||
| 
 | 
 | ||||||
| func generateStages(conf Conf, group string) ([]stage.Stage, error) { | func generateStages(conf Conf, group string) ([]stage.Stage, error) { | ||||||
| 	stages := []stage.Stage{} | 	stages := []stage.Stage{} | ||||||
|  | 	existNames := map[string]bool{} | ||||||
| 	for _, s := range conf.Stages { | 	for _, s := range conf.Stages { | ||||||
| 		if s.Group != "" && group != s.Group { | 		if s.Group != "" && group != s.Group { | ||||||
| 			continue | 			continue | ||||||
| 		} | 		} | ||||||
|  | 		_, ok := existNames[s.Name] // check for existence
 | ||||||
|  | 		if ok { | ||||||
|  | 			continue | ||||||
|  | 		} | ||||||
|  | 		existNames[s.Name] = true | ||||||
| 		var cmds []stage.Cmd | 		var cmds []stage.Cmd | ||||||
| 		defaultCmd := s.Executor.With.Default | 		defaultCmd := s.Executor.With.Default | ||||||
| 		for _, optionalCmd := range s.Executor.With.Cases { | 		for _, optionalCmd := range s.Executor.With.Cases { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user