From d4608eec26bf90eac8523a63c3f21723047ef541 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 10 May 2022 12:05:02 +0800 Subject: [PATCH] update app --- pkg/utils/file.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pkg/utils/file.go b/pkg/utils/file.go index c5db776d0..b852098b8 100644 --- a/pkg/utils/file.go +++ b/pkg/utils/file.go @@ -40,29 +40,29 @@ func GetNewFileNameAndContentType(fileName string, fileType int) (string, string } 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 { case constant.IOSPlatformID: - newFileName += constant.IOSPlatformStr - newYamlName += constant.IOSPlatformStr + newFileName = constant.IOSPlatformStr + newFileName + newYamlName = constant.IOSPlatformStr + newYamlName case constant.AndroidPlatformID: - newFileName += constant.AndroidPlatformStr - newYamlName += constant.AndroidPlatformStr + newFileName = constant.AndroidPlatformStr + newFileName + newYamlName = constant.AndroidPlatformStr + newYamlName case constant.WindowsPlatformID: - newFileName += constant.WindowsPlatformStr - newYamlName += constant.WindowsPlatformStr + newFileName = constant.WindowsPlatformStr + newFileName + newYamlName = constant.WindowsPlatformStr + newYamlName case constant.OSXPlatformID: - newFileName += constant.OSXPlatformStr - newYamlName += constant.OSXPlatformStr + newFileName = constant.OSXPlatformStr + newFileName + newYamlName = constant.OSXPlatformStr + newYamlName case constant.WebPlatformID: - newFileName += constant.WebPlatformStr - newYamlName += constant.WebPlatformStr + newFileName = constant.WebPlatformStr + newFileName + newYamlName = constant.WebPlatformStr + newYamlName case constant.MiniWebPlatformID: - newFileName += constant.MiniWebPlatformStr - newYamlName += constant.MiniWebPlatformStr + newFileName = constant.MiniWebPlatformStr + newFileName + newYamlName = constant.MiniWebPlatformStr + newYamlName case constant.LinuxPlatformID: - newFileName += constant.LinuxPlatformStr - newYamlName += constant.LinuxPlatformStr + newFileName = constant.LinuxPlatformStr + newFileName + newYamlName = constant.LinuxPlatformStr + newYamlName default: return "", "", errors.New("invalid app type") }