Skip to content

Commit

Permalink
clean (Laerdal.Builder.targets): ShouldSkipMacCatalyst -> Should_Skip…
Browse files Browse the repository at this point in the history
…_MacCatalyst

[skip ci]
  • Loading branch information
ksidirop-laerdal committed Jul 9, 2024
1 parent 56d1295 commit f27d80a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
msbuild \
"Laerdal.Builder.targets" \
-m:1 \
-p:ShouldSkipMacCatalyst="false" \
-p:Should_Skip_MacCatalyst="false" \
\
-p:PackageOutputPath="${{env.BUILD_REPOSITORY_FOLDERPATH}}/Artifacts" \
-p:Laerdal_Gradle_Path="/opt/homebrew/opt/gradle@7/bin/gradle" \
Expand Down
6 changes: 3 additions & 3 deletions Laerdal.McuMgr/Laerdal.McuMgr.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<TargetFrameworks>$(TargetFrameworks)netstandard2.1;</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks)net8.0-android;</TargetFrameworks>
<TargetFrameworks Condition=" '$(IsOSX)' == 'true' ">$(TargetFrameworks)net8.0-ios11;</TargetFrameworks>
<TargetFrameworks Condition=" '$(IsOSX)' == 'true' and '$(ShouldSkipMacCatalyst)' != 'true' ">$(TargetFrameworks)net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition=" '$(IsOSX)' == 'true' and '$(Should_Skip_MacCatalyst)' != 'true' ">$(TargetFrameworks)net8.0-maccatalyst</TargetFrameworks>

<IsNet8 Condition=" '$(TargetFramework.ToLower().StartsWith(net8))' == 'true' ">true</IsNet8>
<IsNet8IOS Condition=" '$(TargetFramework.ToLower().StartsWith(net8.0-ios))' == 'true' ">true</IsNet8IOS>
Expand Down Expand Up @@ -105,7 +105,7 @@
<Message Importance="High" Text="TargetFramework: '$(TargetFramework)' "/>
<Message Importance="High" Text="DefineConstants: '$(DefineConstants)' "/>
<Message Importance="high" Text="MSBuildNodeCount: '$(MSBuildNodeCount)' "/>
<Message Importance="high" Text="ShouldSkipMacCatalyst: '$(ShouldSkipMacCatalyst)' "/>
<Message Importance="high" Text="Should_Skip_MacCatalyst: '$(Should_Skip_MacCatalyst)' "/>

<Message Importance="high" Text="IsNet8: '$(IsNet8)' "/>
<Message Importance="high" Text="IsNetX: '$(IsNetX)' "/>
Expand Down Expand Up @@ -157,7 +157,7 @@
<PackageReference Include="Laerdal.McuMgr.Bindings.iOS" Version="1.0.1039.0"/>
</ItemGroup>

<ItemGroup Condition=" '$(IsNetXMacCatalyst)' == 'true' and '$(ShouldSkipMacCatalyst)' != 'true' ">
<ItemGroup Condition=" '$(IsNetXMacCatalyst)' == 'true' and '$(Should_Skip_MacCatalyst)' != 'true' ">
<PackageReference Include="Laerdal.McuMgr.Bindings.MacCatalyst" Version="1.0.1039.0"/>
</ItemGroup>

Expand Down
10 changes: 5 additions & 5 deletions Laerdal.Scripts/Laerdal.Builder.targets
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

<Laerdal_Test_Results_Folderpath Condition=" '$(Laerdal_Test_Results_Folderpath)' == '' ">$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), `..`, `TestResults`))</Laerdal_Test_Results_Folderpath>

<ShouldSkipMacCatalyst Condition=" '$(ShouldSkipMacCatalyst)' == '' ">false</ShouldSkipMacCatalyst>
<Should_Skip_MacCatalyst Condition=" '$(Should_Skip_MacCatalyst)' == '' ">false</Should_Skip_MacCatalyst>

<Laerdal_Gradle_Path Condition=" '$(Laerdal_Gradle_Path)' == '' ">gradle</Laerdal_Gradle_Path>
<Laerdal_Source_Branch Condition=" '$(Laerdal_Source_Branch)' == '' ">$(BUILD_SOURCEBRANCH)</Laerdal_Source_Branch>
Expand Down Expand Up @@ -190,14 +190,14 @@
<_Laerdal_Build_Parameters>$(_Laerdal_Build_Parameters)SourceRoot=$(MSBuildThisFileDirectory)/../Laerdal.McuMgr.Bindings/;</_Laerdal_Build_Parameters>
<_Laerdal_Build_Parameters>$(_Laerdal_Build_Parameters)Configuration=$(Configuration);</_Laerdal_Build_Parameters>
<_Laerdal_Build_Parameters>$(_Laerdal_Build_Parameters)PackageOutputPath=$(PackageOutputPath);</_Laerdal_Build_Parameters>
<_Laerdal_Build_Parameters>$(_Laerdal_Build_Parameters)ShouldSkipMacCatalyst=$(ShouldSkipMacCatalyst);</_Laerdal_Build_Parameters>
<_Laerdal_Build_Parameters>$(_Laerdal_Build_Parameters)Should_Skip_MacCatalyst=$(Should_Skip_MacCatalyst);</_Laerdal_Build_Parameters>
<!--<_Laerdal_Build_Parameters>$(_Laerdal_Build_Parameters)DeterministicSourcePaths=False;</_Laerdal_Build_Parameters>-->
</PropertyGroup>

<!-- its absolute vital to call these targets first explicitly and separately from the main build otherwise the -->
<!-- resulting nugets will be poisoned and will not work in maui apps at all due to missing native symbols -->
<MSBuild Projects="$(Laerdal_McuMgrBindings_ProjectFile_iOS)" Targets="EnsureFrameworkFolderIsCreated"/>
<MSBuild Projects="$(Laerdal_McuMgrBindings_ProjectFile_MacCatalyst)" Targets="EnsureFrameworkFolderIsCreated" Condition=" '$(ShouldSkipMacCatalyst)' != 'true' "/>
<MSBuild Projects="$(Laerdal_McuMgrBindings_ProjectFile_MacCatalyst)" Targets="EnsureFrameworkFolderIsCreated" Condition=" '$(Should_Skip_MacCatalyst)' != 'true' "/>

<!-- 1. notice that we are actually rebuilding bindings merely building the project doesnt really cut it -->
<!-- 2. also notice that the ios and android builds are deliberately getting built with parallelization turned -->
Expand All @@ -211,7 +211,7 @@
<MSBuild Projects="$(Laerdal_McuMgrBindings_ProjectFile_iOS)" Properties="$(_Laerdal_Build_Parameters)" Targets="Restore;Rebuild"/>
<MSBuild Projects="$(Laerdal_McuMgrBindings_ProjectFile_NetStandard)" Properties="$(_Laerdal_Build_Parameters)" Targets="Restore;Rebuild"/>

<MSBuild Projects="$(Laerdal_McuMgrBindings_ProjectFile_MacCatalyst)" Properties="$(_Laerdal_Build_Parameters)" Targets="Restore;Rebuild" Condition=" '$(ShouldSkipMacCatalyst)' != 'true' "/>
<MSBuild Projects="$(Laerdal_McuMgrBindings_ProjectFile_MacCatalyst)" Properties="$(_Laerdal_Build_Parameters)" Targets="Restore;Rebuild" Condition=" '$(Should_Skip_MacCatalyst)' != 'true' "/>

<PropertyGroup>
<_Laerdal_Build_Parameters>$(_Laerdal_Build_Parameters)SourceRoot=$(MSBuildThisFileDirectory)/../Laerdal.McuMgr/;</_Laerdal_Build_Parameters>
Expand All @@ -229,7 +229,7 @@

<MSBuild Targets="Restore"
Projects="$(Laerdal_McuMgrBindings_ProjectFile_Tests)"
Properties="Configuration=$(Configuration);ShouldSkipMacCatalyst=$(ShouldSkipMacCatalyst);"/>
Properties="Configuration=$(Configuration);Should_Skip_MacCatalyst=$(Should_Skip_MacCatalyst);"/>

<PropertyGroup>
<TestParameters>$(TestParameters) test 'Laerdal.McuMgr.Tests/Laerdal.McuMgr.Tests.csproj'</TestParameters>
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
inputs:
command: 'custom'
custom: 'msbuild'
arguments: 'Laerdal.Scripts/Laerdal.Builder.targets -m:1 -p:ShouldSkipMacCatalyst="true" -p:Laerdal_Gradle_Path="/usr/local/opt/gradle@7/bin/gradle" -p:Laerdal_Test_Results_Folderpath="$(Laerdal_Test_Results_Folderpath)" -p:Laerdal_Github_Access_Token="$(Github.ComponentsTeam.AccessToken)" -p:Laerdal_Repository_Path="$(Repository.Path)" -p:Laerdal_Source_Branch="$(Build.SourceBranch)" -p:PackageOutputPath="$(Build.ArtifactStagingDirectory)/Artifacts/" '
arguments: 'Laerdal.Scripts/Laerdal.Builder.targets -m:1 -p:Should_Skip_MacCatalyst="true" -p:Laerdal_Gradle_Path="/usr/local/opt/gradle@7/bin/gradle" -p:Laerdal_Test_Results_Folderpath="$(Laerdal_Test_Results_Folderpath)" -p:Laerdal_Github_Access_Token="$(Github.ComponentsTeam.AccessToken)" -p:Laerdal_Repository_Path="$(Repository.Path)" -p:Laerdal_Source_Branch="$(Build.SourceBranch)" -p:PackageOutputPath="$(Build.ArtifactStagingDirectory)/Artifacts/" '

- task: PublishTestResults@2
displayName: '📡 Publish Test Results'
Expand Down

0 comments on commit f27d80a

Please sign in to comment.