<?php

function cmsBuildUpgradeWorkspace($rootPath, $targetVersion)
{
    $normalizedRoot = rtrim(str_replace('\\', '/', $rootPath), '/');
    $baseDir = $normalizedRoot . '/data/upgrade_tmp';

    return [
        'base_dir' => $baseDir,
        'zip_file' => $baseDir . '/yutou_upgrade_' . $targetVersion . '.zip',
        'extract_dir' => $baseDir . '/yutou_extract_' . $targetVersion,
    ];
}
