mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-19 07:47:11 +00:00
Migrate to .NET Core 3
This commit is contained in:
@@ -1,21 +1,48 @@
|
||||
New-Item "$PSScriptRoot\Portable\bin" -ItemType Directory -Force
|
||||
# -- GUI --
|
||||
|
||||
# --- GUI ---
|
||||
$licenseFilePath = "$PSScriptRoot/../License.txt"
|
||||
|
||||
$projectDirPath = "$PSScriptRoot/../DiscordChatExporter.Gui"
|
||||
$publishDirPath = "$PSScriptRoot/bin/build/"
|
||||
$artifactFilePath = "$PSScriptRoot/bin/DiscordChatExporter.zip"
|
||||
|
||||
# Prepare directory
|
||||
if (Test-Path $publishDirPath) {
|
||||
Remove-Item $publishDirPath -Recurse -Force
|
||||
}
|
||||
New-Item $publishDirPath -ItemType Directory -Force
|
||||
|
||||
# Build & publish
|
||||
dotnet publish $projectDirPath -o $publishDirPath -c Release | Out-Host
|
||||
|
||||
# Get files
|
||||
$files = @()
|
||||
$files += Get-Item -Path "$PSScriptRoot\..\License.txt"
|
||||
$files += Get-ChildItem -Path "$PSScriptRoot\..\DiscordChatExporter.Gui\bin\Release\*" -Include "*.exe", "*.dll", "*.config"
|
||||
$files += Get-Item -Path $licenseFilePath
|
||||
$files += Get-ChildItem -Path $publishDirPath
|
||||
|
||||
# Pack into archive
|
||||
$files | Compress-Archive -DestinationPath "$PSScriptRoot\Portable\bin\DiscordChatExporter.zip" -Force
|
||||
$files | Compress-Archive -DestinationPath $artifactFilePath -Force
|
||||
|
||||
# --- CLI ---
|
||||
|
||||
# Get files
|
||||
# -- CLI --
|
||||
|
||||
$licenseFilePath = "$PSScriptRoot/../License.txt"
|
||||
|
||||
$projectDirPath = "$PSScriptRoot/../DiscordChatExporter.Cli"
|
||||
$publishDirPath = "$PSScriptRoot/bin/build/"
|
||||
$artifactFilePath = "$PSScriptRoot/bin/DiscordChatExporter.Cli.zip"
|
||||
|
||||
# Prepare directory
|
||||
if (Test-Path $publishDirPath) {
|
||||
Remove-Item $publishDirPath -Recurse -Force
|
||||
}
|
||||
New-Item $publishDirPath -ItemType Directory -Force
|
||||
|
||||
# Build & publish
|
||||
dotnet publish $projectDirPath -o $publishDirPath -c Release | Out-Host
|
||||
|
||||
$files = @()
|
||||
$files += Get-Item -Path "$PSScriptRoot\..\License.txt"
|
||||
$files += Get-ChildItem -Path "$PSScriptRoot\..\DiscordChatExporter.Cli\bin\Release\net46\*" -Include "*.exe", "*.dll", "*.config"
|
||||
$files += Get-Item -Path $licenseFilePath
|
||||
$files += Get-ChildItem -Path $publishDirPath
|
||||
|
||||
# Pack into archive
|
||||
$files | Compress-Archive -DestinationPath "$PSScriptRoot\Portable\bin\DiscordChatExporter.CLI.zip" -Force
|
||||
$files | Compress-Archive -DestinationPath $artifactFilePath -Force
|
||||
Reference in New Issue
Block a user