Add preserving package output directory across sequential package builds
This commit is contained in:
@@ -82,8 +82,8 @@ namespace Flax.Deploy
|
||||
|
||||
// Prepare the package output
|
||||
PackageOutputPath = Path.Combine(Globals.EngineRoot, string.Format("Package_{0}_{1:00}_{2:00000}", VersionMajor, VersionMinor, VersionBuild));
|
||||
Utilities.DirectoryDelete(PackageOutputPath);
|
||||
Directory.CreateDirectory(PackageOutputPath);
|
||||
if (!Directory.Exists(PackageOutputPath))
|
||||
Directory.CreateDirectory(PackageOutputPath);
|
||||
|
||||
Log.Info(string.Empty);
|
||||
Log.Info(string.Empty);
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace Flax.Deploy
|
||||
// Prepare
|
||||
RootPath = Globals.EngineRoot;
|
||||
OutputPath = Path.Combine(Deployer.PackageOutputPath, "Editor");
|
||||
Utilities.DirectoryDelete(OutputPath);
|
||||
Directory.CreateDirectory(OutputPath);
|
||||
Log.Info(string.Empty);
|
||||
Log.Info("Deploy editor files");
|
||||
@@ -130,12 +131,14 @@ namespace Flax.Deploy
|
||||
{
|
||||
// Use system tool (preserves executable file attributes and link files)
|
||||
editorPackageZipPath = Path.Combine(Deployer.PackageOutputPath, "FlaxEditorLinux.zip");
|
||||
Utilities.FileDelete(editorPackageZipPath);
|
||||
Utilities.Run("zip", "Editor.zip -r .", null, OutputPath, Utilities.RunOptions.None);
|
||||
File.Move(Path.Combine(OutputPath, "Editor.zip"), editorPackageZipPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
editorPackageZipPath = Path.Combine(Deployer.PackageOutputPath, "Editor.zip");
|
||||
Utilities.FileDelete(editorPackageZipPath);
|
||||
using (ZipFile zip = new ZipFile())
|
||||
{
|
||||
zip.AddDirectory(OutputPath);
|
||||
@@ -152,6 +155,7 @@ namespace Flax.Deploy
|
||||
{
|
||||
Log.Info("Compressing editor debug symbols files...");
|
||||
editorPackageZipPath = Path.Combine(Deployer.PackageOutputPath, "EditorDebugSymbols.zip");
|
||||
Utilities.FileDelete(editorPackageZipPath);
|
||||
using (ZipFile zip = new ZipFile())
|
||||
{
|
||||
zip.AddDirectory(Path.Combine(Deployer.PackageOutputPath, "EditorDebugSymbols"));
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace Flax.Deploy
|
||||
string platformName = platform.ToString();
|
||||
string src = Path.Combine(platformsRoot, platformName);
|
||||
string dst = Path.Combine(Deployer.PackageOutputPath, platformName);
|
||||
Utilities.DirectoryDelete(dst);
|
||||
|
||||
// Deploy files
|
||||
{
|
||||
@@ -69,6 +70,7 @@ namespace Flax.Deploy
|
||||
Log.Info("Compressing platform files...");
|
||||
|
||||
var packageZipPath = Path.Combine(Deployer.PackageOutputPath, platformName + ".zip");
|
||||
Utilities.FileDelete(packageZipPath);
|
||||
using (ZipFile zip = new ZipFile())
|
||||
{
|
||||
zip.AddDirectory(dst);
|
||||
|
||||
Reference in New Issue
Block a user