Exemplo n.º 1
0
        /// <summary>
        /// 上传资源到CDN
        /// </summary>
        /// <param name="path"></param>
        /// <param name="version"></param>
        /// <param name="upload_script"></param>
        public static void UploadCDN(string path, string version, string upload_script)
        {
            if (!string.IsNullOrEmpty(path) && !string.IsNullOrEmpty(version))
            {
                string script_path = Path.Combine(Application.dataPath, "../" + upload_script);
                script_path = Path.GetFullPath(script_path);

                string upload_path = string.Format("update/{0}/{1}", path, version);
                //var lastVersion = GameVersion.CreateVersion(version);
                //lastVersion.VersionDecrease();
                //string last_upload_path = string.Format("update/{0}/{1}/{2}", app_name, channel_name, lastVersion.ToString());
                string local_path = BuilderPreference.ASSET_PATH;
                string args       = string.Format(" {0} {1} {2} android", script_path, upload_path, local_path);
                SVNUtility.Upload(args);

                string upload_fail_path = Path.Combine(Application.dataPath, "../uploadfaild_list.txt");
                upload_fail_path = Path.GetFullPath(upload_fail_path);
                if (File.Exists(upload_fail_path))
                {
                    EditorUtility.DisplayDialog("Warning", "资源上传CDN发生错误, 请查看项目根目录下uploadfaild_list.txt文件", "OK");
                }
            }
            else
            {
                EditorUtility.DisplayDialog("Error", "资源上传CDN错误, 没有设置渠道名或游戏名或版本号!", "OK");
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 上传资源到内网
        /// </summary>
        public static void UploadInner()
        {
            string script_path = Path.Combine(Application.dataPath, "../rsync_243_res.py");

            script_path = Path.GetFullPath(script_path);

            SVNUtility.Upload(script_path);
        }
Exemplo n.º 3
0
        public override IEnumerator OnBuilding()
        {
            CommitPackAssets();

            yield return(null);

            SVNUtility.Commit(Application.dataPath, "资源整理");
        }
Exemplo n.º 4
0
 public void CommitPackAssets()
 {
     try
     {
         string[] localPaths = new string[]
         {
             BuilderPreference.ASSET_PATH,
             BuilderPreference.TEMP_ASSET_PATH
         };
         SVNUtility.Commit(localPaths, "提交打包资源");
     }
     catch (Exception e)
     {
         EditorUtility.DisplayDialog("错误", "资源上传svn错误: " + e.Message, "OK");
     }
 }
Exemplo n.º 5
0
        public override IEnumerator OnBuilding()
        {
            string[] path = new[]
            {
                BuilderPreference.ASSET_PATH,      // 文件版本文件

                BuilderPreference.TEMP_ASSET_PATH, // 更新打包备份目录的AB资源
            };
            SVNUtility.Update(path);
            yield return(null);


            string projectPath = Path.Combine(Application.dataPath, "../");

            projectPath = Path.GetFullPath(projectPath);

            SVNUtility.Update(projectPath);

            yield return(null);

            checkVersionAsset();

            AssetDatabase.Refresh();
        }