public void SaveFiles(VersionUpdateInfo versionUpdateInfo)
    {
        GameBuilder.DoSaveVersionFile(_appVersion,
                                      PlatformEditorUtils.GetBuildToolVersionDir(_buildTarget) + "/" + VersionConst.VersionFileName);

        SaveUpdateInfo(versionUpdateInfo);

        CopyToDiffPath();
    }
    /// <summary>
    /// 获得补丁版本
    /// </summary>
    public static AppVersion GetLastBuildVersion(BuildTarget buildTarget)
    {
        string path = PlatformEditorUtils.GetBuildToolVersionDir(buildTarget) + "/" + VersionConst.VersionFileName;

        if (!File.Exists(path))
        {
            return(new AppVersion());
        }

        string versionStr = File.ReadAllText(path);

        return(new AppVersion(versionStr));
    }
    public VersionPatchBuilder(BuildTarget buildTarget, AppVersion appVersion, long buildNum)
    {
        _appVersion      = appVersion;
        _buildNum        = buildNum;
        _buildTarget     = buildTarget;
        VersionOutputDir = PlatformEditorUtils.GetBuildToolVersionDir(buildTarget);
        FileUtils.CreateDirectory(VersionOutputDir);

        string versionOutputRoot = PlatformEditorUtils.GetBuildToolVersionPatchDir(_buildTarget, _appVersion);

        FileUtils.CreateDirectory(versionOutputRoot);

        _timeVersionDirName = string.Format("{0:yyyy-MM-dd hh_mm_ss}({1})", DateTime.Now, buildNum);

        // 以当前的时间戳来命名文件夹
        _currentBuildVersionRootPath = versionOutputRoot + "/" + _timeVersionDirName;

        FileUtils.CreateDirectory(_currentBuildVersionRootPath);
        FileUtils.CreateDirectory(PatchDir);
        FileUtils.CreateDirectory(SnapshotDir);
    }