Skip to content

Commit

Permalink
fix order of $null comparison to get correct comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
doebrowsk authored Oct 28, 2024
1 parent 2f1f64d commit 5b4ba3d
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/dotnet-build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,8 @@ jobs:
shell: pwsh
run: |
[xml]$csproj = Get-Content "${{ inputs.release_project }}"
$csproj.Project.PropertyGroup
$csproj.Project.PropertyGourp.TargetFrameworks
$targetFrameworks = $csproj.Project.PropertyGroup.TargetFrameworks
if ($targetFrameworks -eq $null) {
if ($null -eq $targetFrameworks) {
$targetFrameworks = $csproj.Project.PropertyGroup.TargetFramework
}
echo "release_platforms: $targetFrameworks"
Expand Down Expand Up @@ -136,17 +134,6 @@ jobs:
echo "$releaseArtifacts" >> $env:GITHUB_ENV
echo "EOF" >> $env:GITHUB_ENV
- name: Check for manifest
if: success() && env.CREATE_RELEASE == 'True' && inputs.integration_type == 'orchestrator'
run: |
[xml]$csproj = Get-Content "${{ inputs.release_project }}"
$targetFrameworks = $csproj.Project.PropertyGroup.TargetFrameworks
if ($targetFrameworks -eq $null) {
$targetFrameworks = $csproj.Project.PropertyGroup.TargetFramework
}
echo "release_platforms: $targetFrameworks"
echo "release_platforms=$targetFrameworks" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
- name: Release Asset(s)
uses: softprops/action-gh-release@v2
if: success() && env.CREATE_RELEASE == 'True'
Expand Down

0 comments on commit 5b4ba3d

Please sign in to comment.