adding .proj files
This commit is contained in:
parent
5ab66803a3
commit
7a7fda5240
|
|
@ -0,0 +1,6 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<Company>Philips</Company>
|
||||
<Version>1.0.2</Version>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ToolsDir Condition=" '$(ToolsDir)' == '' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\'))</ToolsDir>
|
||||
<FLS_DIR Condition="'$(FLS_DIR)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\'))</FLS_DIR>
|
||||
<CommonTasksFile >$(ToolsDir)Common.Targets.proj</CommonTasksFile>
|
||||
|
||||
</PropertyGroup>
|
||||
<Import Project="$(ToolsDir)api_automation_build.proj" />
|
||||
<Import Project="$(ToolsDir)Common.Targets.proj" />
|
||||
|
||||
|
||||
|
||||
<UsingTask TaskName="IncremnetVersion" TaskFactory="CodeTaskFactory" AssemblyFile="c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Build.Tasks.v4.0.dll">
|
||||
<ParameterGroup>
|
||||
<VersionString ParameterType="System.String" Required="True" />
|
||||
<VersionIncrement ParameterType="System.String" Required="True" />
|
||||
<IncrementedVersion ParameterType="System.String" Output="true" />
|
||||
</ParameterGroup>
|
||||
<Task>
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.IO.Compression.FileSystem" />
|
||||
<Using Namespace="System" />
|
||||
<Using Namespace="System.IO" />
|
||||
<Using Namespace="System.IO.Compression" />
|
||||
<Code Type="Fragment" Language="cs">
|
||||
<![CDATA[
|
||||
Version incrementedVer;
|
||||
try
|
||||
{
|
||||
Log.LogMessage("incrementing Version task with params : VersionString = {0} VersionIncrement = {1}", VersionString, VersionIncrement);
|
||||
Version ver = new Version();
|
||||
int inc;
|
||||
if (!Version.TryParse(VersionString, out ver))
|
||||
{
|
||||
throw new Exception(string.Format("Illegal version format loaded: {0}", VersionString));
|
||||
}
|
||||
if (!Int32.TryParse(VersionIncrement, out inc))
|
||||
{
|
||||
throw new Exception(string.Format("Illegal version format loaded: {0}", VersionString));
|
||||
}
|
||||
|
||||
incrementedVer = new Version(ver.Major, ver.Minor, ver.Build + inc);
|
||||
IncrementedVersion = incrementedVer.ToString();
|
||||
Log.LogMessage("incremented Version : {0}", incrementedVer.ToString());
|
||||
return true;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.LogError("ex");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
]]>
|
||||
</Code>
|
||||
</Task>
|
||||
</UsingTask>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
|
||||
<ToolsDir Condition=" '$(ToolsDir)' == '' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\'))</ToolsDir>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(ToolsDir)Common.Properties.proj" />
|
||||
|
||||
<Target Name="IncremnetAssembly">
|
||||
|
||||
<IncremnetVersion VersionString="$(Version)" VersionIncrement="1" >
|
||||
|
||||
<Output PropertyName="ProductVersion" TaskParameter="IncrementedVersion" />
|
||||
|
||||
</IncremnetVersion>
|
||||
<Message Importance="HIGH" Text="xx $(ProductVersion) $(IncrementedVersion) calling XmlPoke"/>
|
||||
|
||||
<XmlPoke XmlInputPath="$(ToolsDir)..\Directory.Build.props" Query="//Version" Value="$(ProductVersion)" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="StageAssemblyInfo">
|
||||
|
||||
<Message Importance="high" Text="Staging Common assemblyInfo from: $(ToolsDir)..\Directory.Build.Props to: $(SubSystemRootDir)Directory.Build.Props*"/>
|
||||
<!--<Copy SourceFiles="$(ToolsDir)..\Directory.Build.Props" DestinationFiles="$(SubSystemRootDir)Directory.Build.Props" OverwriteReadOnlyFiles="true" />-->
|
||||
</Target>
|
||||
|
||||
<Target Name="UpdateBuildNumber">
|
||||
<Message Importance="high" Text="Executing target: UpdateBuildNumber"/>
|
||||
<IncremnetVersion VersionString="$(Version)" VersionIncrement="0" >
|
||||
<Output PropertyName="ProductVersion" TaskParameter="IncrementedVersion" />
|
||||
</IncremnetVersion>
|
||||
|
||||
<PropertyGroup>
|
||||
<Organization Condition=" '$(Organization)' == '' ">++++ ServiceId Not Assigned ++++</Organization>
|
||||
<ProjID Condition=" '$(ProjID)' == '' ">++++ ServiceId Not Assigned ++++</ProjID>
|
||||
<ServiceId Condition=" '$(ServiceId)' == '' " >++++ ServiceId Not Assigned ++++</ServiceId>
|
||||
</PropertyGroup>
|
||||
<Message Importance="high" Text="Using BundleVersion=$(ProductVersion)"/>
|
||||
<Message Importance="high" Text="##vso[build.updatebuildnumber]$(Organization)-$(ProjID)-$(ServiceId)-$(ProductVersion)"/>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<SrcDir Condition=" '$(SrcDir)' == '' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\AutomationTest\'))</SrcDir>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(ToolsDir)Common.Properties.proj" />
|
||||
<ItemGroup>
|
||||
<Testproj Include="$(SrcDir)**/*.UnitTest.csproj" />
|
||||
<TestFolders Include="@(Testproj->'%(RootDir)%(Directory)')" />
|
||||
</ItemGroup>
|
||||
<Target Name="build">
|
||||
<CallTarget Targets="IncremnetAssembly"/>
|
||||
<!--<Exec Command="dotnet D:\SonarQube\sonar-scanner-msbuild-4.7.1.2311-netcoreapp2.0\SonarScanner.MSBuild.dll begin /k:Api-Gateway-Automation " />-->
|
||||
<Exec Command="dotnet build $(SrcDir)Philips.EDI.Foundation.APIGateway.AutomationTest.sln" WorkingDirectory="$(SrcDir)" />
|
||||
<!--<Exec Command="dotnet D:\SonarQube\sonar-scanner-msbuild-4.7.1.2311-netcoreapp2.0\SonarScanner.MSBuild.dll end" />-->
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
Loading…
Reference in New Issue