Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
dotnet_diagnostic.SA1005.severity = none

# see: https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3920
dotnet_diagnostic.SA1202.severity = none

# Analysis and refactoring rules for Ubiquity.NET
# Description: Code analysis rules for Ubiquity.NET projects

Expand Down Expand Up @@ -1408,8 +1411,6 @@ dotnet_diagnostic.SA1200.severity = error

dotnet_diagnostic.SA1201.severity = error

dotnet_diagnostic.SA1202.severity = error

dotnet_diagnostic.SA1203.severity = none

dotnet_diagnostic.SA1204.severity = silent
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ jobs:
- name: Run Tests
run: ./Invoke-Tests.ps1

# Upload test results even if failed; unless cancelled
- name: Upload Test Results
if: (!cancelled())
uses: actions/upload-artifact@v4
with:
name: Test Results
Expand Down
4 changes: 2 additions & 2 deletions Build-All.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ try
}

mkdir $buildInfo['NuGetOutputPath'] -ErrorAction SilentlyContinue | Out-Null

dotnet build -c $Configuration 'src/Ubiquity.NET.Versioning.slnx'
.\New-GeneratedVersionProps.ps1 $buildInfo
dotnet build -c $Configuration --no-incremental 'src/Ubiquity.NET.Versioning.slnx'
}
catch
{
Expand Down
31 changes: 8 additions & 23 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
<Project>
<!--
For local builds of this solution in IDE ONLY
FORCE the Build Versioning Info as there is no lib to rely on; (This repo builds it!) and the automated build
scripts aren't used to build from within an IDE. Automated builds/Command line builds use the PowerShell
scripts to setup the variables for use in the build. This, handles the case of builds directly from the IDE
so that can complete a compilation.

Though, it should ONLY be used for local testing. Running the scripts locally from a command line is
the final best test of a given set of changes to the source.
-->
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)'=='true'">
<!-- File Version for v5.0.0-alpha (See: https://csemver.org/playground/site/#/) [1.27597.27630.61954]-->
<!-- CiBuildIndex => UInt16.MaxValue -->
<!-- +1 to revision to account for CI build -->
<FileVersion>1.27597.27630.61955</FileVersion>
<PackageVersion>5.0.0-a.ci-4294967295.IDE</PackageVersion>
<ProductVersion>5.0.0-alpha.ci-4294967295.IDE</ProductVersion>
<AssemblyVersion>$(FileVersion)</AssemblyVersion>
<InformationalVersion>$(ProductVersion)</InformationalVersion>
<PropertyGroup>
<GeneratedVersionProps>$(MSBuildThisFileDirectory)GeneratedVersion.props</GeneratedVersionProps>
</PropertyGroup>

<!--
For command line builds (including official PR/CI/Release automated builds) use the props file
generated by the scripts.
Import the generated version information for this build; Projects in this repo cannot use themselves
to generate the version information. Tests VALIDATE that the actual built packages do contain
expected values though so the duplication of computing the versioning is verified to produce the same
results, at least for the packages tested. The existence is tested again in the targets file and reported
as an error if not present.
-->
<Import Condition="'$(BuildingInsideVisualStudio)'!='true' AND '$(MSBuildProjectExtension)'!='.pssproj'" Project="GeneratedVersion.props" />
<Import Condition="Exists('$(GeneratedVersionProps)')" Project="$(GeneratedVersionProps)" />

<!--
Description:
Expand Down
5 changes: 3 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
where it belongs. For a good explanation of this problem see: https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/.
For an explanation of the benefits of the language feature see: https://www.hanselman.com/blog/implicit-usings-in-net-6
-->
<Error Condition="'$(ImplicitUsings)'!='disable'" Text="$(MSBuildProjectFile) - Projects in this repository MUST NOT have ImplicitUsings enabled!"/>
<Error Condition="'$(ImplicitUsings)'!='disable'" Code="REPO001" Text="$(MSBuildProjectFile) - Projects in this repository MUST NOT have ImplicitUsings enabled!"/>

<Warning Condition="'$(BuildingInsideVisualStudio)' == 'true'" Text="!!! This is an IDE build. Version numbering is 'FAKED' !!!"/>
<!--Verify that GeneratedVersion.props exists; and produce a, hopefully, informative message on how to create it if it doesn't -->
<Error Condition="!Exists('$(GeneratedVersionProps)')" Code="REPO002" Text="$(GeneratedVersionProps) file does not exist, it must be created by `New-GeneratedBersionProps.ps1` BEFORE building in the IDE for consistent results"/>
</Target>
</Project>
Loading
Loading