forked from toolshed/abra
		
	refactor: single missing value
This commit is contained in:
		| @ -197,7 +197,7 @@ checkout as-is. Recipe commit hashes are also supported as values for | |||||||
| 			log.Debug(i18n.G("skipping domain checks")) | 			log.Debug(i18n.G("skipping domain checks")) | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		deployedVersion := config.NO_VERSION_DEFAULT | 		deployedVersion := config.MISSING_DEFAULT | ||||||
| 		if deployMeta.IsDeployed { | 		if deployMeta.IsDeployed { | ||||||
| 			deployedVersion = deployMeta.Version | 			deployedVersion = deployMeta.Version | ||||||
| 			if deployMeta.IsChaos { | 			if deployMeta.IsChaos { | ||||||
|  | |||||||
| @ -73,7 +73,7 @@ Passing "--prune/-p" does not remove those volumes.`), | |||||||
| 		if err := internal.DeployOverview( | 		if err := internal.DeployOverview( | ||||||
| 			app, | 			app, | ||||||
| 			version, | 			version, | ||||||
| 			config.NO_DOMAIN_DEFAULT, | 			config.MISSING_DEFAULT, | ||||||
| 			"", | 			"", | ||||||
| 			nil, | 			nil, | ||||||
| 			nil, | 			nil, | ||||||
|  | |||||||
| @ -66,12 +66,12 @@ func DeployOverview( | |||||||
|  |  | ||||||
| 	domain := app.Domain | 	domain := app.Domain | ||||||
| 	if domain == "" { | 	if domain == "" { | ||||||
| 		domain = config.NO_DOMAIN_DEFAULT | 		domain = config.MISSING_DEFAULT | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	envVersion := app.Recipe.EnvVersionRaw | 	envVersion := app.Recipe.EnvVersionRaw | ||||||
| 	if envVersion == "" { | 	if envVersion == "" { | ||||||
| 		envVersion = config.NO_VERSION_DEFAULT | 		envVersion = config.MISSING_DEFAULT | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	rows := [][]string{ | 	rows := [][]string{ | ||||||
| @ -140,7 +140,7 @@ func DeployOverview( | |||||||
| } | } | ||||||
|  |  | ||||||
| func getDeployType(currentVersion, newVersion string) string { | func getDeployType(currentVersion, newVersion string) string { | ||||||
| 	if newVersion == config.NO_DOMAIN_DEFAULT { | 	if newVersion == config.MISSING_DEFAULT { | ||||||
| 		return i18n.G("UNDEPLOY") | 		return i18n.G("UNDEPLOY") | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| @ -156,7 +156,7 @@ func getDeployType(currentVersion, newVersion string) string { | |||||||
| 		return ("REDEPLOY") | 		return ("REDEPLOY") | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	if currentVersion == config.NO_VERSION_DEFAULT { | 	if currentVersion == config.MISSING_DEFAULT { | ||||||
| 		return i18n.G("NEW DEPLOY") | 		return i18n.G("NEW DEPLOY") | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| @ -191,17 +191,17 @@ func MoveOverview( | |||||||
|  |  | ||||||
| 	domain := app.Domain | 	domain := app.Domain | ||||||
| 	if domain == "" { | 	if domain == "" { | ||||||
| 		domain = config.NO_DOMAIN_DEFAULT | 		domain = config.MISSING_DEFAULT | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	secretsOverview := strings.Join(secrets, "\n") | 	secretsOverview := strings.Join(secrets, "\n") | ||||||
| 	if len(secrets) == 0 { | 	if len(secrets) == 0 { | ||||||
| 		secretsOverview = config.NO_SECRETS_DEFAULT | 		secretsOverview = config.MISSING_DEFAULT | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	volumesOverview := strings.Join(volumes, "\n") | 	volumesOverview := strings.Join(volumes, "\n") | ||||||
| 	if len(volumes) == 0 { | 	if len(volumes) == 0 { | ||||||
| 		volumesOverview = config.NO_VOLUMES_DEFAULT | 		volumesOverview = config.MISSING_DEFAULT | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	rows := [][]string{ | 	rows := [][]string{ | ||||||
|  | |||||||
| @ -116,10 +116,7 @@ var ( | |||||||
|  |  | ||||||
| 	DIRTY_DEFAULT = "+U" | 	DIRTY_DEFAULT = "+U" | ||||||
|  |  | ||||||
| 	NO_DOMAIN_DEFAULT  = "-" | 	MISSING_DEFAULT = "-" | ||||||
| 	NO_VERSION_DEFAULT = "-" |  | ||||||
| 	NO_SECRETS_DEFAULT = "-" |  | ||||||
| 	NO_VOLUMES_DEFAULT = "-" |  | ||||||
|  |  | ||||||
| 	UNKNOWN_DEFAULT = "unknown" | 	UNKNOWN_DEFAULT = "unknown" | ||||||
| ) | ) | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user