diff --git a/.gitignore b/.gitignore index a788580..f21df30 100644 --- a/.gitignore +++ b/.gitignore @@ -261,4 +261,7 @@ __pycache__/ *.pyc # Ammy auto-generated XAML -*.g.xaml \ No newline at end of file +*.g.xaml + +# Deploy output +Deploy/Output/ \ No newline at end of file diff --git a/Deploy/Prepare.ps1 b/Deploy/Prepare.ps1 new file mode 100644 index 0000000..6aac887 --- /dev/null +++ b/Deploy/Prepare.ps1 @@ -0,0 +1,22 @@ +$path = "..\DiscordChatExporter\bin\Release\*" +$include = "*.exe", "*.dll", "*.config" +$outputDir = "Output" +$outputFile = "DiscordChatExporter.zip" + +# Create output directory +if (-Not (Test-Path $outputDir)) +{ + New-Item $outputDir -ItemType Directory +} + +# Delete output if already exists +if (Test-Path("$outputDir/$outputFile")) +{ + Remove-Item -Path "$outputDir/$outputFile" +} + +# Get files +$files = Get-ChildItem -Path $path -Include $include + +# Pack into archive +$files | Compress-Archive -DestinationPath "$outputDir/$outputFile" \ No newline at end of file