generated from unoplatform/template
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #708 from unoplatform/dev/ds/sdk-updater-automation
Adjust gitversion
- Loading branch information
Showing
2 changed files
with
104 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,89 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<TemplatesSourceDirectory>$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)', '..', '..', 'src'))</TemplatesSourceDirectory> | ||
<UnoSdkDirectory>$([MSBuild]::NormalizePath('$(TemplatesSourceDirectory)', 'Uno.Sdk'))</UnoSdkDirectory> | ||
<GitVersion_ToolArgments> /config $([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)', '..', '..', 'build', 'gitversion.yml'))</GitVersion_ToolArgments> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Update="ReadMe.md" CopyToOutputDirectory="PreserveNewest" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="NuGet.Packaging" Version="6.10.0" /> | ||
<PackageReference Include="GitVersion.MsBuild" Version="5.10.3"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<Target Name="GenerateLocalFileSystem" BeforeTargets="BeforeCompile"> | ||
<PropertyGroup> | ||
<TemplateVersion Condition=" $(TemplateVersion) == '' ">$(Version)</TemplateVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<_LocalFileSystem Include="$(IntermediateOutputPath)\LocalFileSystem.cs" /> | ||
<_FileSystemLine Include="//------------------------------------------------------------------------------" /> | ||
<_FileSystemLine Include="// <auto-generated>" /> | ||
<_FileSystemLine Include="// This code was auto generated by the build. Changes to this file will be lost." /> | ||
<_FileSystemLine Include="// </auto-generated>" /> | ||
<_FileSystemLine Include="//------------------------------------------------------------------------------" /> | ||
<_FileSystemLine Include="using Uno.Sdk.Models%3b" /> | ||
<_FileSystemLine Include="namespace Uno.Sdk.Updater%3b" /> | ||
<_FileSystemLine Include="[global::System.Runtime.CompilerServices.CompilerGenerated]" /> | ||
<_FileSystemLine Include="[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]" /> | ||
<_FileSystemLine Include="internal static partial class LocalFileSystem" /> | ||
<_FileSystemLine Include="{" /> | ||
<_FileSystemLine Include="public const string TemplatesSourceDirectory = @"$(TemplatesSourceDirectory)"%3b" /> | ||
<_FileSystemLine Include="public const string UnoSdkDirectory = @"$(UnoSdkDirectory)"%3b" /> | ||
<_FileSystemLine Include="}" /> | ||
</ItemGroup> | ||
<WriteLinesToFile File="%(_LocalFileSystem.Identity)" | ||
Lines="@(_FileSystemLine)" | ||
Overwrite="true" /> | ||
|
||
<ItemGroup> | ||
<Compile Include="%(_LocalFileSystem.Identity)" /> | ||
<_GeneratedCodeFiles Include="%(_LocalFileSystem.Identity)" /> | ||
<FileWrites Include="%(_LocalFileSystem.Identity)" /> | ||
</ItemGroup> | ||
</Target> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<TemplatesSourceDirectory>$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)', '..', '..', 'src'))</TemplatesSourceDirectory> | ||
<UnoSdkDirectory>$([MSBuild]::NormalizePath('$(TemplatesSourceDirectory)', 'Uno.Sdk'))</UnoSdkDirectory> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Update="ReadMe.md" CopyToOutputDirectory="PreserveNewest" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="NuGet.Packaging" Version="6.10.0" /> | ||
</ItemGroup> | ||
|
||
<Target Name="GenerateVersion" BeforeTargets="BeforeCompile"> | ||
|
||
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> | ||
<GitVersion_FullSemVer Condition="'$(GitVersion_FullSemVer)'==''">255.255.255.255</GitVersion_FullSemVer> | ||
</PropertyGroup> | ||
|
||
<Error Condition="'$(GitVersion_FullSemVer)'==''" | ||
Text="The environment variable GitVersion_FullSemVer must be set" /> | ||
|
||
<ItemGroup> | ||
<_GitVersionFileSystem Include="$(IntermediateOutputPath)\GitVersionInformation.g.cs" /> | ||
<_GitVersionFileSystemLine Include="//------------------------------------------------------------------------------" /> | ||
<_GitVersionFileSystemLine Include="// <auto-generated>" /> | ||
<_GitVersionFileSystemLine Include="// This code was auto generated by the build. Changes to this file will be lost." /> | ||
<_GitVersionFileSystemLine Include="// </auto-generated>" /> | ||
<_GitVersionFileSystemLine Include="//------------------------------------------------------------------------------" /> | ||
<_GitVersionFileSystemLine Include="using Uno.Sdk.Models%3b" /> | ||
<_GitVersionFileSystemLine Include="namespace Uno.Sdk.Updater%3b" /> | ||
<_GitVersionFileSystemLine Include="[global::System.Runtime.CompilerServices.CompilerGenerated]" /> | ||
<_GitVersionFileSystemLine Include="[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]" /> | ||
<_GitVersionFileSystemLine Include="internal static partial class GitVersionInformation" /> | ||
<_GitVersionFileSystemLine Include="{" /> | ||
<_GitVersionFileSystemLine Include="public const string NuGetVersion = @"$(GitVersion_FullSemVer)"%3b" /> | ||
<_GitVersionFileSystemLine Include="}" /> | ||
</ItemGroup> | ||
<WriteLinesToFile File="%(_GitVersionFileSystem.Identity)" | ||
Lines="@(_GitVersionFileSystemLine)" | ||
Overwrite="true" /> | ||
|
||
<ItemGroup> | ||
<Compile Include="%(_GitVersionFileSystem.Identity)" /> | ||
<_GeneratedCodeFiles Include="%(_GitVersionFileSystem.Identity)" /> | ||
<FileWrites Include="%(_GitVersionFileSystem.Identity)" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Target Name="GenerateLocalFileSystem" BeforeTargets="BeforeCompile"> | ||
<PropertyGroup> | ||
<TemplateVersion Condition=" $(TemplateVersion) == '' ">$(Version)</TemplateVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<_LocalFileSystem Include="$(IntermediateOutputPath)\LocalFileSystem.cs" /> | ||
<_FileSystemLine Include="//------------------------------------------------------------------------------" /> | ||
<_FileSystemLine Include="// <auto-generated>" /> | ||
<_FileSystemLine Include="// This code was auto generated by the build. Changes to this file will be lost." /> | ||
<_FileSystemLine Include="// </auto-generated>" /> | ||
<_FileSystemLine Include="//------------------------------------------------------------------------------" /> | ||
<_FileSystemLine Include="using Uno.Sdk.Models%3b" /> | ||
<_FileSystemLine Include="namespace Uno.Sdk.Updater%3b" /> | ||
<_FileSystemLine Include="[global::System.Runtime.CompilerServices.CompilerGenerated]" /> | ||
<_FileSystemLine Include="[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]" /> | ||
<_FileSystemLine Include="internal static partial class LocalFileSystem" /> | ||
<_FileSystemLine Include="{" /> | ||
<_FileSystemLine Include="public const string TemplatesSourceDirectory = @"$(TemplatesSourceDirectory)"%3b" /> | ||
<_FileSystemLine Include="public const string UnoSdkDirectory = @"$(UnoSdkDirectory)"%3b" /> | ||
<_FileSystemLine Include="}" /> | ||
</ItemGroup> | ||
<WriteLinesToFile File="%(_LocalFileSystem.Identity)" | ||
Lines="@(_FileSystemLine)" | ||
Overwrite="true" /> | ||
|
||
<ItemGroup> | ||
<Compile Include="%(_LocalFileSystem.Identity)" /> | ||
<_GeneratedCodeFiles Include="%(_LocalFileSystem.Identity)" /> | ||
<FileWrites Include="%(_LocalFileSystem.Identity)" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
</Project> | ||
|