Permalink
Fetching contributors…
Cannot retrieve contributors at this time
260 lines (181 sloc) 14.6 KB
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Import Project="$(MSBuildProjectDirectory)/build.tasks" />
<PropertyGroup>
<MajorVersion Condition="$(MajorVersion) == ''">4</MajorVersion>
<MinorVersion Condition="$(MinorVersion) == ''">5</MinorVersion>
<PatchVersion Condition="$(PatchVersion) == ''">$(BUILD_NUMBER)</PatchVersion>
</PropertyGroup>
<PropertyGroup>
<BuildSolutionDir>$(MSBuildProjectDirectory)/..</BuildSolutionDir>
<SrcDir>$(BuildSolutionDir)/src</SrcDir>
<Configuration>Signed</Configuration>
<NUnitConsoleArgs>/noshadow</NUnitConsoleArgs>
<NuGetPath>$(SrcDir)/.nuget/nuget.exe</NuGetPath>
<NuGetPackageDir>$(BuildSolutionDir)/NuGet.Signed/</NuGetPackageDir>
<Version>$(MajorVersion).$(MinorVersion).$(PatchVersion).0</Version>
<PackageVersion>$(MajorVersion).$(MinorVersion).$(PatchVersion)</PackageVersion>
</PropertyGroup>
<PropertyGroup>
<DoBuildSolutionsDependsOn>
BuildSolutions
</DoBuildSolutionsDependsOn>
</PropertyGroup>
<ItemGroup>
<NugetPackageFilesToDelete Include="$(NuGetPackageDir)/*.nupkg"/>
</ItemGroup>
<Target Name="Default" DependsOnTargets="$(DoBuildSolutionsDependsOn)" />
<Target Name="TeamCityBuild">
<CallTarget Targets="Default" />
</Target>
<Target Name="BuildSolutions">
<!--<MSBuild Projects="$(SrcDir)/ServiceStack.Signed.sln" Targets="Build" Properties="Configuration=$(Configuration);" />-->
<!--<MSBuild Projects="$(SrcDir)/ServiceStack.sln" Targets="Build"
Properties="Configuration=$(Configuration);SignAssembly=true;AssemblyOriginatorKeyFile=../src/servicestack-sn.pfx" />-->
</Target>
<Target Name="UpdateVersion">
<ItemGroup>
<!-- Add Version to AssemblyFileVersion -->
<RegexTransform Include="$(SrcDir)/**/AssemblyInfo.cs">
<Find>AssemblyFileVersion\(\"\d+\.\d+\.\d+\.\d+\"\)</Find>
<ReplaceWith>AssemblyFileVersion("$(Version)")</ReplaceWith>
</RegexTransform>
<!-- Keep AssemblyVersion at 4.0.0.0 -->
<RegexTransform Include="$(SrcDir)/**/AssemblyInfo.cs">
<Find>AssemblyVersion\(\"\d+\.\d+\.\d+\.\d+\"\)</Find>
<ReplaceWith>AssemblyVersion("4.0.0.0")</ReplaceWith>
</RegexTransform>
<!--Update Min Dependency Version -->
<RegexTransform Include="$(NuGetPackageDir)/**/*.nuspec">
<Find>version="4\.5[^"]*"</Find>
<ReplaceWith>version="$(PackageVersion)"</ReplaceWith>
</RegexTransform>
</ItemGroup>
<RegexTransform Items="@(RegexTransform)" />
</Target>
<Target Name="NuGetPack">
<CallTarget Targets="UpdateVersion" />
<Delete Files="@(NugetPackageFilesToDelete)" />
<ItemGroup>
<ServiceStackFiles Include="$(SrcDir)/ServiceStack/bin/$(Configuration)/net45/ServiceStack.dll"></ServiceStackFiles>
<ServiceStackFiles Include="$(SrcDir)/ServiceStack/bin/$(Configuration)/net45/ServiceStack.pdb"></ServiceStackFiles>
<ServiceStackFiles Include="$(SrcDir)/ServiceStack/bin/$(Configuration)/net45/ServiceStack.xml"></ServiceStackFiles>
<ServerFiles Include="$(SrcDir)/ServiceStack.Server/bin/$(Configuration)/net45/ServiceStack.Server.*"></ServerFiles>
<RabbitMqFiles Include="$(SrcDir)/ServiceStack.RabbitMq/bin/$(Configuration)/net45/ServiceStack.RabbitMq.*"></RabbitMqFiles>
<RazorFiles Include="$(SrcDir)/ServiceStack.Razor/bin/$(Configuration)/net45/ServiceStack.Razor.*"></RazorFiles>
<SwaggerFiles Include="$(SrcDir)/ServiceStack.Api.Swagger/bin/$(Configuration)/net45/ServiceStack.Api.Swagger.*"></SwaggerFiles>
<OpenApiFiles Include="$(SrcDir)/ServiceStack.Api.OpenApi/bin/$(Configuration)/net45/ServiceStack.Api.OpenApi.*"></OpenApiFiles>
<ClientFiles Include="$(SrcDir)/ServiceStack.Client/bin/$(Configuration)/net45/ServiceStack.Client.*"></ClientFiles>
<ClientFilesSL5 Include="$(SrcDir)/ServiceStack.Client/bin/$(Configuration)/net45/ServiceStack.Client.*"></ClientFilesSL5>
<HttpClientFiles Include="$(SrcDir)/ServiceStack.HttpClient/bin/$(Configuration)/net45/ServiceStack.HttpClient.*"></HttpClientFiles>
<CommonFiles Include="$(SrcDir)/ServiceStack.Common/bin/$(Configuration)/net45/ServiceStack.Common.*"></CommonFiles>
<CommonFilesSL5 Include="$(SrcDir)/ServiceStack.Common.SL5/bin/$(Configuration)/net45/ServiceStack.Common.*"></CommonFilesSL5>
<ProtoBufFiles Include="$(SrcDir)/ServiceStack.ProtoBuf/bin/$(Configuration)/net45/ServiceStack.ProtoBuf.*"></ProtoBufFiles>
<MvcFiles Include="$(SrcDir)/ServiceStack.Mvc/bin/$(Configuration)/net45/ServiceStack.Mvc.*"></MvcFiles>
<OAuth2Files Include="$(SrcDir)/ServiceStack.Authentication.OAuth2/bin/$(Configuration)/net45/ServiceStack.Authentication.OAuth2.*"></OAuth2Files>
</ItemGroup>
<!-- ServiceStack.Api.Swagger -->
<MSBuild Projects="$(SrcDir)/ServiceStack.Api.Swagger/ServiceStack.Api.Swagger.Signed.csproj"
Targets="Build"
Properties="Version=$(PackageVersion)" />
<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Api.Swagger.Signed/lib/net45" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Api.Swagger.Signed/lib/net45')" />
<Copy SourceFiles="%(SwaggerFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Api.Swagger.Signed/lib/net45" />
<!-- Disables -Symbols-->
<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Api.Swagger.Signed/servicestack.api.swagger.signed.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />
<!-- ServiceStack.Api.OpenApi -->
<MSBuild Projects="$(SrcDir)/ServiceStack.Api.OpenApi/ServiceStack.Api.OpenApi.Signed.csproj"
Targets="Build"
Properties="Version=$(PackageVersion)" />
<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Api.OpenApi.Signed/lib/net45" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Api.OpenApi.Signed/lib/net45')" />
<Copy SourceFiles="%(OpenApiFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Api.OpenApi.Signed/lib/net45" />
<!-- Disables -Symbols-->
<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Api.OpenApi.Signed/servicestack.api.openapi.signed.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />
<!-- ServiceStack.Client -->
<MSBuild Projects="../src/ServiceStack.Client/ServiceStack.Client.Signed.csproj"
Targets="Build"
Properties="Version=$(PackageVersion)" />
<Copy SourceFiles="%(ClientFiles.Identity)" DestinationFolder="$(BuildSolutionDir)/lib/signed" />
<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Client.Signed/lib/net45" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Client.Signed/lib/net45')" />
<Copy SourceFiles="%(ClientFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Client.Signed/lib/net45" />
<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Client.Signed/servicestack.client.signed.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />
<!-- ServiceStack.HttpClient -->
<MSBuild Projects="../src/ServiceStack.HttpClient/ServiceStack.HttpClient.Signed.csproj"
Targets="Build"
Properties="Version=$(PackageVersion)" />
<Copy SourceFiles="%(HttpClientFiles.Identity)" DestinationFolder="$(BuildSolutionDir)/lib/signed" />
<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.HttpClient.Signed/lib/net45" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.HttpClient.Signed/lib/net45')" />
<Copy SourceFiles="%(HttpClientFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.HttpClient.Signed/lib/net45" />
<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.HttpClient.Signed/servicestack.httpclient.signed.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />
<!-- ServiceStack.Common -->
<MSBuild Projects="../src/ServiceStack.Common/ServiceStack.Common.Signed.csproj"
Targets="Build"
Properties="Version=$(PackageVersion)" />
<Copy SourceFiles="%(CommonFiles.Identity)" DestinationFolder="$(BuildSolutionDir)/lib/signed" />
<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Common.Signed/lib/net45" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Common.Signed/lib/net45')" />
<Copy SourceFiles="%(CommonFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Common.Signed/lib/net45" />
<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Common.Signed/servicestack.common.signed.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />
<!-- ServiceStack -->
<MSBuild Projects="../src/ServiceStack/ServiceStack.Signed.csproj"
Targets="Build"
Properties="Version=$(PackageVersion)" />
<Copy SourceFiles="%(ServiceStackFiles.Identity)" DestinationFolder="$(BuildSolutionDir)/lib/signed" />
<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Signed/lib/net45" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Signed/lib/net45')" />
<Copy SourceFiles="%(ServiceStackFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Signed/lib/net45" />
<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Signed/servicestack.signed.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />
<!-- ServiceStack.Server -->
<MSBuild Projects="../src/ServiceStack.Server/ServiceStack.Server.Signed.csproj"
Targets="Build"
Properties="Version=$(PackageVersion)" />
<Copy SourceFiles="%(ServerFiles.Identity)" DestinationFolder="$(BuildSolutionDir)/lib/signed" />
<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Server.Signed/lib/net45" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Server.Signed/lib/net45')" />
<Copy SourceFiles="%(ServerFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Server.Signed/lib/net45" />
<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Server.Signed/servicestack.server.signed.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />
<!-- ServiceStack.RabbitMq -->
<MSBuild Projects="$(SrcDir)/ServiceStack.RabbitMq/ServiceStack.RabbitMq.Signed.csproj"
Targets="Build"
Properties="Version=$(PackageVersion)" />
<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.RabbitMq.Signed/lib/net45" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.RabbitMq.Signed/lib/net45')" />
<Copy SourceFiles="%(RabbitMqFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.RabbitMq.Signed/lib/net45" />
<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.RabbitMq.Signed/servicestack.rabbitmq.signed.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />
<!-- ServiceStack.Razor -->
<MSBuild Projects="../src/ServiceStack.Razor/ServiceStack.Razor.Signed.csproj"
Targets="Build"
Properties="Version=$(PackageVersion)" />
<Copy SourceFiles="%(RazorFiles.Identity)" DestinationFolder="$(BuildSolutionDir)/lib/signed" />
<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Razor.Signed/lib/net45" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Razor.Signed/lib/net45')" />
<Copy SourceFiles="%(RazorFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Razor.Signed/lib/net45" />
<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Razor.Signed/servicestack.razor.signed.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />
<!-- ServiceStack.ProtoBuf -->
<MSBuild Projects="$(SrcDir)/ServiceStack.ProtoBuf/ServiceStack.ProtoBuf.Signed.csproj"
Targets="Build"
Properties="Version=$(PackageVersion)" />
<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.ProtoBuf.Signed/lib/net45" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.ProtoBuf.Signed/lib/net45')" />
<Copy SourceFiles="%(ProtoBufFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.ProtoBuf.Signed/lib/net45" />
<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.ProtoBuf.Signed/servicestack.protobuf.signed.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />
<!-- ServiceStack.Mvc -->
<MSBuild Projects="$(SrcDir)/ServiceStack.Mvc/ServiceStack.Mvc.Signed.csproj"
Targets="Build"
Properties="Version=$(PackageVersion)" />
<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Mvc.Signed/lib/net45" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Mvc.Signed/lib/net45')" />
<Copy SourceFiles="%(MvcFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Mvc.Signed/lib/net45" />
<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Mvc.Signed/servicestack.mvc.signed.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />
<!-- ServiceStack.Authentication.OAuth2 -->
<MSBuild Projects="$(SrcDir)/ServiceStack.Authentication.OAuth2/ServiceStack.Authentication.OAuth2.Signed.csproj"
Targets="Build"
Properties="Version=$(PackageVersion)" />
<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Authentication.OAuth2.Signed/lib/net45" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Authentication.OAuth2.Signed/lib/net45')" />
<Copy SourceFiles="%(OAuth2Files.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Authentication.OAuth2.Signed/lib/net45" />
<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Authentication.OAuth2.Signed/servicestack.authentication.oauth2.signed.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />
</Target>
</Project>