revise versioning

This commit is contained in:
Hongtao Zhang 2024-03-27 00:46:14 -05:00
parent 42c21a2815
commit 0c773b0266
2 changed files with 7 additions and 5 deletions

View file

@ -18,7 +18,8 @@ jobs:
build:
runs-on: windows-latest
env:
FlowVersion: 1.17.2
steps:
- uses: actions/checkout@v4
- name: Generate build number
@ -32,7 +33,7 @@ jobs:
with:
file: |
"**/SolutionAssemblyInfo.cs"
version: 1.17.2-build.${{ steps.buildnumber.outputs.build_number }}
version: $FlowVersion-build.${{ steps.buildnumber.outputs.build_number }}
- uses: actions/cache@v4
name: Restore Nuget Cache
with:
@ -69,7 +70,7 @@ jobs:
run: dotnet test --no-build --verbosity normal -c Release
- name: Perform post_build tasks
shell: pwsh
run: .\Scripts\post_build.ps1
run: .\Scripts\post_build.ps1 -flowversion "$FlowVersion-build.${{ steps.buildnumber.outputs.build_number }}"
- name: Upload Plugin Nupkg
uses: actions/upload-artifact@v4
with:

View file

@ -1,7 +1,8 @@
param(
[string]$config = "Release",
[string]$solution = (Join-Path $PSScriptRoot ".." -Resolve),
[string]$channel = "win-x64-prerelease"
[string]$channel = "win-x64-prerelease",
[string]$flowVersion = ""
)
Write-Host "Config: $config"
Write-Host "Solution: $solution"
@ -9,7 +10,7 @@ Write-Host "Channel: $channel"
function Build-Version
{
if ( [string]::IsNullOrEmpty($env:flowVersion))
if ( [string]::IsNullOrEmpty($flowVersion))
{
$targetPath = Join-Path $solution "Output/Release/Flow.Launcher.dll" -Resolve
$v = (Get-Command ${targetPath}).FileVersionInfo.FileVersion