mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix error occurred when publishing self contained .Net Core Wox
Error occurs during nuget pack, complaining about some of the core dlls have incorrect timestamp
This commit is contained in:
parent
7ba6dbf076
commit
9c65b84345
1 changed files with 14 additions and 1 deletions
|
|
@ -115,13 +115,26 @@ function Pack-Squirrel-Installer ($path, $version, $output) {
|
|||
Write-Host "End pack squirrel installer"
|
||||
}
|
||||
|
||||
function IsDotNetCoreAppSelfContainedPublishEvent{
|
||||
return Test-Path $solution\Output\Release\coreclr.dll
|
||||
}
|
||||
|
||||
function FixPublishLastWriteDateTimeError ($solutionPath) {
|
||||
#Fix error from publishing self contained app, when nuget tries to pack core dll references throws the error 'The DateTimeOffset specified cannot be converted into a Zip file timestamp'
|
||||
gci -path "$solutionPath\Output\Release" -rec -file *.dll | Where-Object {$_.LastWriteTime -lt (Get-Date).AddYears(-20)} | % { try { $_.LastWriteTime = '01/01/2000 00:00:00' } catch {} }
|
||||
}
|
||||
|
||||
function Main {
|
||||
$p = Build-Path
|
||||
$v = Build-Version
|
||||
Copy-Resources $p $config
|
||||
|
||||
if ($config -eq "Release"){
|
||||
|
||||
|
||||
if(IsDotNetCoreAppSelfContainedPublishEvent) {
|
||||
FixPublishLastWriteDateTimeError $p
|
||||
}
|
||||
|
||||
Delete-Unused $p $config
|
||||
$o = "$p\Output\Packages"
|
||||
Validate-Directory $o
|
||||
|
|
|
|||
Loading…
Reference in a new issue