Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
stamepicmorg committed Sep 29, 2024
1 parent e2bb019 commit ddc5724
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ jobs:

- name: Patch csproj version and assembly version
run: |
$csproj_files = Get-ChildItem -Path '*.csproj'
$csproj_files = Get-ChildItem -Recurse -Filter '*.csproj'
if ($csproj_files.Count -eq 0) {
Write-Error "No .csproj files found."
exit 1
}
$version = (Get-Content $csproj_files[0].FullName) -match '<Version>(\d+)\.(\d+)\.(\d+)</Version>' | Out-Null
$major = $matches[1]
$minor = $matches[2]
Expand All @@ -53,6 +58,7 @@ jobs:
-replace '<AssemblyVersion>.*</AssemblyVersion>', "<AssemblyVersion>$new_version.0</AssemblyVersion>" `
| Set-Content $file.FullName
}
shell: pwsh

- name: Build
Expand Down

0 comments on commit ddc5724

Please sign in to comment.