move plugin version bump to build step

This commit is contained in:
Jeremy Wu 2025-05-20 12:43:26 +10:00 committed by GitHub
parent b878532cdd
commit 94cec8aa1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,14 +8,6 @@ init:
{
$env:prereleaseTag = "{0}.{1}.{2}.{3}" -f $version.Major, $version.Minor, $version.Build, $version.Revision
}
$jsonFiles = Get-ChildItem -Path ".\Plugins\*\plugin.json"
foreach ($file in $jsonFiles) {
$plugin_old_ver = Get-Content $file.FullName -Raw | ConvertFrom-Json
(Get-Content $file) -replace '"Version"\s*:\s*".*?"', "`"Version`": `"$env:flowVersion`"" | Set-Content $file
$plugin_new_ver = Get-Content $file.FullName -Raw | ConvertFrom-Json
Write-Host "Updated" $plugin_old_ver.Name "version from" $plugin_old_ver.Version "to" $plugin_new_ver.Version
}
- sc config WSearch start= auto # Starts Windows Search service- Needed for running ExplorerTest
- net start WSearch
@ -34,7 +26,16 @@ image: Visual Studio 2022
platform: Any CPU
configuration: Release
before_build:
- ps: nuget restore
- ps: |
nuget restore
$jsonFiles = Get-ChildItem -Path ".\Plugins\*\plugin.json"
foreach ($file in $jsonFiles) {
$plugin_old_ver = Get-Content $file.FullName -Raw | ConvertFrom-Json
(Get-Content $file) -replace '"Version"\s*:\s*".*?"', "`"Version`": `"$env:flowVersion`"" | Set-Content $file
$plugin_new_ver = Get-Content $file.FullName -Raw | ConvertFrom-Json
Write-Host "Updated" $plugin_old_ver.Name "version from" $plugin_old_ver.Version "to" $plugin_new_ver.Version
}
build:
project: Flow.Launcher.sln
verbosity: minimal