Merge remote-tracking branch 'origin/tuoyun' into tuoyun

This commit is contained in:
wenxu12345 2022-05-10 12:07:33 +08:00
commit 872f70a418

View File

@ -40,29 +40,29 @@ func GetNewFileNameAndContentType(fileName string, fileType int) (string, string
} }
func GetUploadAppNewName(appType int, version string) (string, string, error) { func GetUploadAppNewName(appType int, version string) (string, string, error) {
var newFileName, newYamlName = version + "_app_", version + "_yaml_" var newFileName, newYamlName = "_" + version + "_app_", version + "_yaml"
switch appType { switch appType {
case constant.IOSPlatformID: case constant.IOSPlatformID:
newFileName += constant.IOSPlatformStr newFileName = constant.IOSPlatformStr + newFileName
newYamlName += constant.IOSPlatformStr newYamlName = constant.IOSPlatformStr + newYamlName
case constant.AndroidPlatformID: case constant.AndroidPlatformID:
newFileName += constant.AndroidPlatformStr newFileName = constant.AndroidPlatformStr + newFileName
newYamlName += constant.AndroidPlatformStr newYamlName = constant.AndroidPlatformStr + newYamlName
case constant.WindowsPlatformID: case constant.WindowsPlatformID:
newFileName += constant.WindowsPlatformStr newFileName = constant.WindowsPlatformStr + newFileName
newYamlName += constant.WindowsPlatformStr newYamlName = constant.WindowsPlatformStr + newYamlName
case constant.OSXPlatformID: case constant.OSXPlatformID:
newFileName += constant.OSXPlatformStr newFileName = constant.OSXPlatformStr + newFileName
newYamlName += constant.OSXPlatformStr newYamlName = constant.OSXPlatformStr + newYamlName
case constant.WebPlatformID: case constant.WebPlatformID:
newFileName += constant.WebPlatformStr newFileName = constant.WebPlatformStr + newFileName
newYamlName += constant.WebPlatformStr newYamlName = constant.WebPlatformStr + newYamlName
case constant.MiniWebPlatformID: case constant.MiniWebPlatformID:
newFileName += constant.MiniWebPlatformStr newFileName = constant.MiniWebPlatformStr + newFileName
newYamlName += constant.MiniWebPlatformStr newYamlName = constant.MiniWebPlatformStr + newYamlName
case constant.LinuxPlatformID: case constant.LinuxPlatformID:
newFileName += constant.LinuxPlatformStr newFileName = constant.LinuxPlatformStr + newFileName
newYamlName += constant.LinuxPlatformStr newYamlName = constant.LinuxPlatformStr + newYamlName
default: default:
return "", "", errors.New("invalid app type") return "", "", errors.New("invalid app type")
} }