Skip to content

Commit

Permalink
Add version replacement for *.Classic projects.
Browse files Browse the repository at this point in the history
  • Loading branch information
CartBlanche committed Sep 26, 2023
1 parent 337ab92 commit 3b17ce0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ jobs:
- name: Setup NuGet
uses: NuGet/[email protected]

- if: ${{ github.event_name == 'workflow_dispatch' }}
name: Update CLI Version Numbers
- name: Update CLI Version Numbers
run: |
$content = Get-Content main/Meadow.CLI/Meadow.CLI.csproj | Out-String
$newcontent = $content -replace '<PackageVersion>.*</PackageVersion>', '<PackageVersion>${{ ENV.CLI_RELEASE_VERSION }}</PackageVersion>'
Expand All @@ -59,6 +58,14 @@ jobs:
$newcontent = $content -replace 'CLI_VERSION = \".*\";', 'CLI_VERSION = "${{ ENV.CLI_RELEASE_VERSION }}";'
$newcontent | Set-Content main/Meadow.CLI.Core/Constants.cs
$content = Get-Content main/Meadow.CLI/Meadow.CLI.Classic.csproj | Out-String
$newcontent = $content -replace '<PackageVersion>.*</PackageVersion>', '<PackageVersion>${{ ENV.CLI_RELEASE_VERSION }}</PackageVersion>'
$newcontent | Set-Content main/Meadow.CLI/Meadow.CLI.Classic.csproj
$content = Get-Content main/Meadow.CLI.Core/Meadow.CLI.Core.Classic.csproj | Out-String
$newcontent = $content -replace '<Version>.*</Version>', '<Version>${{ ENV.CLI_RELEASE_VERSION }}</Version>'
$newcontent | Set-Content main/Meadow.CLI.Core/Meadow.CLI.Core.Classic.csproj
- name: Add MSBuild to Path
uses: microsoft/[email protected]

Expand Down

0 comments on commit 3b17ce0

Please sign in to comment.