From 499a0abe7f1e04bd73a87d6f5986bdad2b89c238 Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Mon, 4 Jan 2021 17:33:08 +0200 Subject: [PATCH 1/7] bump PropertyChanged.Fody to 3.3.1 --- Flow.Launcher/Flow.Launcher.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index 0f8e6a767d2..cf2719f7e0e 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -1,4 +1,4 @@ - + WinExe @@ -81,7 +81,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + From bc3dfd4a73a0ac0ebff249bc73e78f90e67bf15a Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Tue, 5 Jan 2021 01:50:19 +0200 Subject: [PATCH 2/7] appveyor: publish self-contained --- Flow.Launcher/Flow.Launcher.csproj | 4 ---- Scripts/post_build.ps1 | 30 +++++++++++++++--------------- appveyor.yml | 2 ++ 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index cf2719f7e0e..c3b56b9044e 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -94,8 +94,4 @@ - - - - \ No newline at end of file diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 836e27380a9..1cdcbf12e21 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -1,13 +1,13 @@ param( [string]$config = "Release", - [string]$solution, - [string]$targetpath + [string]$solution = (Join-Path $PSScriptRoot ".." -Resolve) ) Write-Host "Config: $config" function Build-Version { if ([string]::IsNullOrEmpty($env:flowVersion)) { - $v = (Get-Command ${TargetPath}).FileVersionInfo.FileVersion + $targetPath = Join-Path $solution "Output/Release/Flow.Launcher.dll" -Resolve + $v = (Get-Command ${targetPath}).FileVersionInfo.FileVersion } else { $v = $env:flowVersion } @@ -75,6 +75,8 @@ function Pack-Squirrel-Installer ($path, $version, $output) { Write-Host "Packing: $spec" Write-Host "Input path: $input" + # making version static as multiple versions can exist in the nuget folder and in the case a breaking change is introduced. + New-Alias Nuget $env:USERPROFILE\.nuget\packages\NuGet.CommandLine\5.4.0\tools\NuGet.exe -Force # TODO: can we use dotnet pack here? nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration=Release @@ -100,13 +102,14 @@ function Pack-Squirrel-Installer ($path, $version, $output) { Write-Host "End pack squirrel installer" } -function IsDotNetCoreAppSelfContainedPublishEvent{ - return Test-Path $solution\Output\Release\coreclr.dll -} +function Publish-Self-Contained ($p) { -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 {} } + $csproj = Join-Path "$p" "Flow.Launcher/Flow.Launcher.csproj" -Resolve + $profile = Join-Path "$p" "Flow.Launcher/Properties/PublishProfiles/NetCore3.1-SelfContained.pubxml" -Resolve + + # we call dotnet publish on the main project. + # The other projects should have been built in Release at this point. + dotnet publish -c Release $csproj /p:PublishProfile=$profile } function Main { @@ -116,15 +119,12 @@ function Main { if ($config -eq "Release"){ - if(IsDotNetCoreAppSelfContainedPublishEvent) { - FixPublishLastWriteDateTimeError $p - } - Delete-Unused $p $config + + Publish-Self-Contained $p + $o = "$p\Output\Packages" Validate-Directory $o - # making version static as multiple versions can exist in the nuget folder and in the case a breaking change is introduced. - New-Alias Nuget $env:USERPROFILE\.nuget\packages\NuGet.CommandLine\5.4.0\tools\NuGet.exe -Force Pack-Squirrel-Installer $p $v $o $isInCI = $env:APPVEYOR diff --git a/appveyor.yml b/appveyor.yml index 1f0937d6ddb..ce36c2adfc8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,6 +26,8 @@ before_build: build: project: Flow.Launcher.sln verbosity: minimal +after_build: + - ps: .\Scripts\post_build.ps1 artifacts: - path: 'Output\Packages\Flow-Launcher-*.zip' From 952a57d8587dd80f4d9923b84168f82af6397bb9 Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Tue, 5 Jan 2021 02:00:37 +0200 Subject: [PATCH 3/7] appveyor: collect squrrel artifacts --- appveyor.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index ce36c2adfc8..90ff8cacb6a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,6 +34,12 @@ artifacts: name: Zip - path: 'Output\Release\Flow.Launcher.Plugin.*.nupkg' name: Plugin nupkg +- path: 'Output\Packages\Flow-Launcher-*.exe' + name: Squirrel Installer +- path: 'Output\Packages\FlowLauncher-*-full.nupkg' + name: Squirrel nupkg +- path: 'Output\Packages\RELEASES' + name: Squirrel RELEASES deploy: provider: NuGet From b3b64e1d2e7d150f5f4ff2bd864d6259d688be05 Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Tue, 5 Jan 2021 03:45:31 +0200 Subject: [PATCH 4/7] set SatelliteResourceLanguages for plugin projects --- .../Flow.Launcher.Plugin.Calculator.csproj | 1 + .../Flow.Launcher.Plugin.Explorer.csproj | 1 + .../Flow.Launcher.Plugin.PluginIndicator.csproj | 1 + 3 files changed, 3 insertions(+) diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj b/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj index 06d8dea7d86..1090926fc8e 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj @@ -11,6 +11,7 @@ true false false + en diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj b/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj index 9d9c09a9397..9f0b46d9385 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj @@ -7,6 +7,7 @@ true true false + en diff --git a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj index 0140444e1bc..cc280b9a9cf 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj +++ b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj @@ -10,6 +10,7 @@ true false false + en From 99e0add54f9c9a2a65cdf6c08409cc465653093d Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Tue, 5 Jan 2021 03:46:32 +0200 Subject: [PATCH 5/7] appveyor: deploy releases to github --- appveyor.yml | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 90ff8cacb6a..28412510b03 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,9 +42,30 @@ artifacts: name: Squirrel RELEASES deploy: - provider: NuGet - artifact: /.*\.nupkg/ - api_key: - secure: n80IeWR3pN81p0w4uXq4mO0TdTXoJSHHFL+yTB9YBJ0Wni2DjZGYwOFdaWzW4hRi - on: - branch: master \ No newline at end of file + - provider: NuGet + artifact: Plugin nupkg + api_key: + secure: n80IeWR3pN81p0w4uXq4mO0TdTXoJSHHFL+yTB9YBJ0Wni2DjZGYwOFdaWzW4hRi + on: + branch: master + + - provider: GitHub + release: v$(flowVersion) + auth_token: + secure: ij4UeXUYQBDJxn2YRAAhUOjklOGVKDB87Hn5J8tKIzj13yatoI7sLM666QDQFEgv + artifact: Squirrel Installer, Squirrel nupkg, Squirrel RELEASES + draft: true + force_update: true + on: + branch: master + APPVEYOR_REPO_TAG: false + + - provider: GitHub + release: v$(flowVersion) + auth_token: + secure: ij4UeXUYQBDJxn2YRAAhUOjklOGVKDB87Hn5J8tKIzj13yatoI7sLM666QDQFEgv + artifact: Squirrel Installer, Squirrel nupkg, Squirrel RELEASES + force_update: true + on: + branch: master + APPVEYOR_REPO_TAG: true \ No newline at end of file From ce2d5d247e5763a37d83321a1d04536d55a532d9 Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Tue, 5 Jan 2021 21:22:54 +0200 Subject: [PATCH 6/7] appveyor: remove zip of output from artifacts plus some clean-up in post_build.ps1 --- Scripts/post_build.ps1 | 29 +++-------------------------- appveyor.yml | 2 -- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 1cdcbf12e21..b08fac8f67f 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -31,13 +31,9 @@ function Build-Path { return $p } -function Copy-Resources ($path, $config) { - $project = "$path\Flow.Launcher" - $output = "$path\Output" - $target = "$output\$config" - Copy-Item -Recurse -Force $project\Images\* $target\Images\ +function Copy-Resources ($path) { # making version static as multiple versions can exist in the nuget folder and in the case a breaking change is introduced. - Copy-Item -Force $env:USERPROFILE\.nuget\packages\squirrel.windows\1.5.2\tools\Squirrel.exe $output\Update.exe + Copy-Item -Force $env:USERPROFILE\.nuget\packages\squirrel.windows\1.5.2\tools\Squirrel.exe $path\Output\Update.exe } function Delete-Unused ($path, $config) { @@ -55,17 +51,6 @@ function Validate-Directory ($output) { New-Item $output -ItemType Directory -Force } -function Zip-Release ($path, $version, $output) { - Write-Host "Begin zip release" - - $content = "$path\Output\Release\*" - $zipFile = "$output\Flow-Launcher-v$version.zip" - - Compress-Archive -Force -Path $content -DestinationPath $zipFile - - Write-Host "End zip release" -} - 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" @@ -115,7 +100,7 @@ function Publish-Self-Contained ($p) { function Main { $p = Build-Path $v = Build-Version - Copy-Resources $p $config + Copy-Resources $p if ($config -eq "Release"){ @@ -126,14 +111,6 @@ function Main { $o = "$p\Output\Packages" Validate-Directory $o Pack-Squirrel-Installer $p $v $o - - $isInCI = $env:APPVEYOR - if ($isInCI) { - Zip-Release $p $v $o - } - - Write-Host "List output directory" - Get-ChildItem $o } } diff --git a/appveyor.yml b/appveyor.yml index 28412510b03..b8812e7ef8f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,8 +30,6 @@ after_build: - ps: .\Scripts\post_build.ps1 artifacts: -- path: 'Output\Packages\Flow-Launcher-*.zip' - name: Zip - path: 'Output\Release\Flow.Launcher.Plugin.*.nupkg' name: Plugin nupkg - path: 'Output\Packages\Flow-Launcher-*.exe' From 407d8f0191047d8e82d52538dd9d36e8da5636dc Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Thu, 7 Jan 2021 00:42:38 +0200 Subject: [PATCH 7/7] appveyor: simplify deploy conditions --- appveyor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b8812e7ef8f..7d1da7f3f32 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -56,7 +56,6 @@ deploy: force_update: true on: branch: master - APPVEYOR_REPO_TAG: false - provider: GitHub release: v$(flowVersion) @@ -65,5 +64,4 @@ deploy: artifact: Squirrel Installer, Squirrel nupkg, Squirrel RELEASES force_update: true on: - branch: master APPVEYOR_REPO_TAG: true \ No newline at end of file