mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-14 15:53:30 -07:00
Simplify deployment script
This commit is contained in:
parent
be4989ea34
commit
c432a75f62
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -262,6 +262,3 @@ __pycache__/
|
||||||
|
|
||||||
# Ammy auto-generated XAML
|
# Ammy auto-generated XAML
|
||||||
*.g.xaml
|
*.g.xaml
|
||||||
|
|
||||||
# Deploy output
|
|
||||||
Deploy/Output/
|
|
||||||
|
|
@ -1,22 +1,3 @@
|
||||||
$path = "$PSScriptRoot\..\DiscordChatExporter\bin\Release\*"
|
New-Item "$PSScriptRoot\bin" -ItemType Directory -Force
|
||||||
$include = "*.exe", "*.dll", "*.config"
|
$files = Get-ChildItem -Path "$PSScriptRoot\..\DiscordChatExporter\bin\Release\*" -Include "*.exe", "*.dll", "*.config"
|
||||||
$outputDir = "$PSScriptRoot\Output"
|
$files | Compress-Archive -DestinationPath "$PSScriptRoot\bin\DiscordChatExporter.zip" -Force
|
||||||
$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"
|
|
||||||
Loading…
Reference in a new issue