Merge pull request #500 from Flow-Launcher/remove_createdump

dev branch: remove createdump.exe
This commit is contained in:
Jeremy Wu 2021-06-28 21:15:19 +10:00 committed by GitHub
commit b75618c81a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,10 +47,20 @@ function Delete-Unused ($path, $config) {
Remove-Item -Path $target -Include "*.xml" -Recurse
}
function Remove-CreateDumpExe ($path, $config) {
$target = "$path\Output\$config"
$depjson = Get-Content $target\Flow.Launcher.deps.json -raw
$depjson -replace '(?s)(.createdump.exe": {.*?}.*?\n)\s*', "" | Out-File $target\Flow.Launcher.deps.json -Encoding UTF8
Remove-Item -Path $target -Include "*createdump.exe" -Recurse
}
function Validate-Directory ($output) {
New-Item $output -ItemType Directory -Force
}
function Pack-Squirrel-Installer ($path, $version, $output) {
# msbuild based installer generation is not working in appveyor, not sure why
Write-Host "Begin pack squirrel installer"
@ -108,10 +118,12 @@ function Main {
Publish-Self-Contained $p
Remove-CreateDumpExe $p $config
$o = "$p\Output\Packages"
Validate-Directory $o
Pack-Squirrel-Installer $p $v $o
}
}
Main
Main