Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
Tidy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Oct 25, 2018
1 parent 13a99ad commit b9bda24
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 34 deletions.
1 change: 1 addition & 0 deletions CallPolly.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "CallPolly.Tests", "tests\Ca
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".project", ".project", "{6047ADD6-C48C-4583-A5C6-58FDF7A0DC10}"
ProjectSection(SolutionItems) = preProject
azure-pipelines.yml = azure-pipelines.yml
build.proj = build.proj
build.ps1 = build.ps1
Directory.Build.props = Directory.Build.props
Expand Down
11 changes: 2 additions & 9 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,15 @@
<Authors>@jet @bartelink and contributors</Authors>
<Company>Jet.com</Company>
<Description>Apply systemwide resilience strategies consistently across subsystems, standing on Polly's shoulders</Description>
<PackageProjectUrl>https://github.com/jet/CallPolly</PackageProjectUrl>
<PackageProjectUrl>https://github.com/jet/callpolly</PackageProjectUrl>
<PackageTags>polly bulkhead circuitbreaker timeout fsharp</PackageTags>
<PackageLicenseUrl>https://github.com/jet/CallPolly/blob/master/LICENSE</PackageLicenseUrl>
<PackageLicenseUrl>https://github.com/jet/callpolly/blob/master/LICENSE</PackageLicenseUrl>
<Copyright>Copyright © 2018</Copyright>

<!-- SourceLink related properties https://github.com/dotnet/SourceLink#using-sourcelink -->

<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<!-- Hacks to disable things for mono builds -->
<PropertyGroup>
<MonoOrEmpty Condition=" '$(OS)' != 'Windows_NT' ">mono </MonoOrEmpty>

<!-- disable sourcelink on mono, to workaround https://github.com/dotnet/sourcelink/issues/155 -->
<EnableSourceLink Condition=" '$(OS)' != 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' ">false</EnableSourceLink>
<EnableSourceControlManagerQueries>$(EnableSourceLink)</EnableSourceControlManagerQueries>
Expand Down
18 changes: 7 additions & 11 deletions build.proj
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
<Project ToolsVersion="15.0" DefaultTargets="Build;Test">

<Import Project="Directory.Build.props" />

<PropertyGroup>

<Name>CallPolly</Name>
<Cfg>--configuration Release</Cfg>

<RepoRootDir>$([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)"))</RepoRootDir>
<Bin>-o $(RepoRootDir)bin</Bin>
<Ver>--version-suffix "$(VersionSuffix)"</Ver>

<BuildNumber Condition="'$(BuildNumber)' != ''">$([System.String]::Format('{0:0000000}',$([MSBuild]::Add($(BuildNumber), 0))))</BuildNumber>
<Suffix Condition=" '$(BuildNumber)' != '' AND '$(PullRequestId)' != ''">--version-suffix CI$(BuildNumber)-pr$(PullRequestId)</Suffix>
<Suffix Condition=" '$(BuildNumber)' != '' AND '$(PullRequestId)' == ''">--version-suffix CI$(BuildNumber)</Suffix>
<ThisDirAbsolute>$([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)"))</ThisDirAbsolute>
<PackOptions>-o $(ThisDirAbsolute)bin --version-suffix "$(VersionSuffix)"</PackOptions>
<TestOptions>--logger:trx</TestOptions>

</PropertyGroup>

<Target Name="Build">
<Exec Command="dotnet pack src/$(Name) $(Cfg) $(Bin) $(Ver)" />
<Exec Command="dotnet pack src/$(Name) $(Cfg) $(PackOptions)" />
</Target>

<Target Name="Test">
<Exec Command="dotnet test tests/$(Name).Tests $(Cfg) --logger:trx" />
<Exec Command="dotnet test tests/$(Name).Acceptance $(Cfg) --logger:trx" />
<Exec Command="dotnet test tests/$(Name).Tests $(Cfg) $(TestOptions)" />
<Exec Command="dotnet test tests/$(Name).Acceptance $(Cfg) $(TestOptions)" />
</Target>

</Project>
14 changes: 7 additions & 7 deletions tests/CallPolly.Acceptance/CallPolly.Acceptance.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@
<Compile Include="..\CallPolly.Tests\Infrastructure.fs" Link="Infrastructure.fs" />
<Compile Include="Scenarios.fs" />
</ItemGroup>

<ItemGroup>
<!-- Workaround for https://github.com/xunit/xunit/issues/1357 -->
<Content Include="xunit.runner.json" Condition=" '$(OS)' != 'Windows_NT' ">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ProjectReference Include="..\..\src\CallPolly\CallPolly.fsproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="3.1.2.5" Condition=" '$(TargetFramework)' == 'net461' " />
Expand All @@ -35,8 +32,11 @@
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>

<!-- Workaround for https://github.com/xunit/xunit/issues/1357 -->
<ItemGroup>
<ProjectReference Include="..\..\src\CallPolly\CallPolly.fsproj" />
<Content Include="xunit.runner.json" Condition=" '$(OS)' != 'Windows_NT' ">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

</Project>
14 changes: 7 additions & 7 deletions tests/CallPolly.Tests/CallPolly.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
<Compile Include="ParsingTests.fs" />
<Compile Include="RulesTests.fs" />
</ItemGroup>

<ItemGroup>
<!-- Workaround for https://github.com/xunit/xunit/issues/1357 -->
<Content Include="xunit.runner.json" Condition=" '$(OS)' != 'Windows_NT' ">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ProjectReference Include="..\..\src\CallPolly\CallPolly.fsproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="3.1.2.5" Condition=" '$(TargetFramework)' == 'net461' " />
Expand All @@ -31,8 +28,11 @@
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>

<!-- Workaround for https://github.com/xunit/xunit/issues/1357 -->
<ItemGroup>
<ProjectReference Include="..\..\src\CallPolly\CallPolly.fsproj" />
<Content Include="xunit.runner.json" Condition=" '$(OS)' != 'Windows_NT' ">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

</Project>

0 comments on commit b9bda24

Please sign in to comment.