Remove legacy steamcmd and SCUM runtime coupling
This commit is contained in:
@@ -106,7 +106,7 @@ func ValidateRunAutonomousLifecyclePlan(plan RunAutonomousLifecyclePlan) error {
|
||||
return ValidationError("autonomous install plan is invalid")
|
||||
}
|
||||
for _, step := range installPlan.Steps {
|
||||
if !ValidLogicalFileKey(step.TargetKey) || !validAutonomousToken(step.Type, 80) || step.PackageManager != "" && !validAutonomousToken(step.PackageManager, 80) || step.PackageName != "" && !validAutonomousToken(step.PackageName, 160) || step.Version != "" && !validAutonomousToken(step.Version, 120) {
|
||||
if !validAutonomousInstallStepType(step.Type) || !ValidLogicalFileKey(step.TargetKey) || step.PackageManager != "" && !validAutonomousToken(step.PackageManager, 80) || step.PackageName != "" && !validAutonomousToken(step.PackageName, 160) || step.Version != "" && !validAutonomousToken(step.Version, 120) {
|
||||
return ValidationError("autonomous install step is invalid")
|
||||
}
|
||||
}
|
||||
@@ -139,6 +139,15 @@ func ValidateRunAutonomousLifecyclePlan(plan RunAutonomousLifecyclePlan) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func validAutonomousInstallStepType(value string) bool {
|
||||
switch value {
|
||||
case "package", "verified-download", "manual":
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func validateAutonomousDataTarget(target RunAutonomousDataTarget) error {
|
||||
if !ValidLogicalFileKey(target.Key) || !ValidLogicalFileKey(target.TransportKey) || !ValidLogicalFileKey(target.SourceRootKey) || !ValidLogicalFileKey(target.SourcePath) || !ValidLogicalFileKey(target.WorkspaceKey) {
|
||||
return ValidationError("autonomous data target is invalid")
|
||||
|
||||
Reference in New Issue
Block a user