mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2024-09-19 12:18:48 -04:00
Simplify deployment script
This commit is contained in:
parent
be4989ea34
commit
c432a75f62
2 changed files with 4 additions and 26 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -261,7 +261,4 @@ __pycache__/
|
|||
*.pyc
|
||||
|
||||
# Ammy auto-generated XAML
|
||||
*.g.xaml
|
||||
|
||||
# Deploy output
|
||||
Deploy/Output/
|
||||
*.g.xaml
|
|
@ -1,22 +1,3 @@
|
|||
$path = "$PSScriptRoot\..\DiscordChatExporter\bin\Release\*"
|
||||
$include = "*.exe", "*.dll", "*.config"
|
||||
$outputDir = "$PSScriptRoot\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"
|
||||
New-Item "$PSScriptRoot\bin" -ItemType Directory -Force
|
||||
$files = Get-ChildItem -Path "$PSScriptRoot\..\DiscordChatExporter\bin\Release\*" -Include "*.exe", "*.dll", "*.config"
|
||||
$files | Compress-Archive -DestinationPath "$PSScriptRoot\bin\DiscordChatExporter.zip" -Force
|
Loading…
Reference in a new issue