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

Commit

Permalink
Merge branch 'master' of https://github.com/OpenCover/opencover
Browse files Browse the repository at this point in the history
  • Loading branch information
sawilde committed Feb 21, 2015
2 parents ddfb882 + 3b4660d commit b595688
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 27 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ The latest releases can be downloaded from [releases](https://github.com/opencov

The primary repo for the project is [on GitHub](https://github.com/opencover/opencover/) and is also where the [wiki](https://github.com/OpenCover/opencover/wiki) and [issues](https://github.com/OpenCover/opencover/wiki) are managed from.

### Team communication

Team communications can be done via [slack](http://slack.com), raise an issue to request access (include your email - obfuscated if you wish) and we will send you an invite then just visit the [team page](https://opencover.slack.com/) to sign up and join the conversation.

### Licence
All Original Software is licensed under the [MIT Licence](https://github.com/opencover/opencover/blob/master/License.md) and does not apply to any other 3rd party tools, utilities or code which may be used to develop this application.

Expand Down
2 changes: 1 addition & 1 deletion main/.nuget/NuGet.targets
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<PropertyGroup>
<!-- NuGet command -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>

<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
Expand Down
2 changes: 1 addition & 1 deletion main/OpenCover.Console/OpenCover.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
2 changes: 1 addition & 1 deletion main/OpenCover.Extensions/OpenCover.Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
2 changes: 1 addition & 1 deletion main/OpenCover.Framework/OpenCover.Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkProfile />
<ProductVersion>12.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -67,10 +69,11 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
<PropertyGroup>
<PostBuildEvent>cd $(SolutionDir)OpenCover.Gendarme.Signer\bin\$(ConfigurationName)
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">cd $(SolutionDir)OpenCover.Gendarme.Signer\bin\$(ConfigurationName)
$(SolutionDir)OpenCover.Gendarme.Signer\bin\$(ConfigurationName)\OpenCover.Gendarme.Signer.exe</PostBuildEvent>
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">mono OpenCover.Gendarme.Signer.exe</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand All @@ -79,4 +82,4 @@ $(SolutionDir)OpenCover.Gendarme.Signer\bin\$(ConfigurationName)\OpenCover.Genda
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
33 changes: 19 additions & 14 deletions main/OpenCover.Gendarme.Signer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,23 @@ namespace OpenCover.Gendarme.Signer
{
class Program
{
private const string TargetFolder = @"..\tools\GendarmeSigned";
private const string SourceFolder = @"packages\Mono.Gendarme.2.11.0.20121120\tools";
private const string StrongNameKey = @"..\build\Version\opencover.gendarme.snk";
private const string GendarmeVersion = "2.11.0.20121120";

static void Main(string[] args)
{
private static readonly string GendarmeAssemblyName = string.Format("Mono.Gendarme.{0}", GendarmeVersion);

private static readonly string TargetFolder = Path.Combine("..", "tools", "GendarmeSigned");
private static readonly string SourceFolder = Path.Combine("packages", GendarmeAssemblyName, "tools");
private static readonly string StrongNameKey = Path.Combine("..", "build", "Version", "opencover.gendarme.snk");

var baseFolder = Path.Combine(Assembly.GetAssembly(typeof(Program)).Location, @"..\..\..\..");
static void Main(string[] args)
{
var assemblyLocation = Assembly.GetAssembly (typeof(Program)).Location;
var assemblyFolder = Path.GetDirectoryName(assemblyLocation);
var baseFolder = Path.Combine(assemblyFolder, "..", "..", "..");

if (!Directory.Exists(Path.Combine(baseFolder, TargetFolder)))
Directory.CreateDirectory(Path.Combine(baseFolder, TargetFolder));
var targetDirectory = Path.Combine (baseFolder, TargetFolder);
if (!Directory.Exists(targetDirectory))
Directory.CreateDirectory (targetDirectory);

if (AlreadySigned(baseFolder))
{
Expand All @@ -39,7 +44,7 @@ static void Main(string[] args)

private static bool AlreadySigned(string baseFolder)
{
var frameworkAssembly = Path.Combine(baseFolder, TargetFolder + @"\Gendarme.Framework.dll");
var frameworkAssembly = Path.Combine(baseFolder, TargetFolder, "Gendarme.Framework.dll");
if (File.Exists(frameworkAssembly))
{
try
Expand All @@ -56,13 +61,13 @@ private static bool AlreadySigned(string baseFolder)

private static void SignGendarmeRulesMaintainability(string baseFolder)
{
var frameworkAssembly = Path.Combine(baseFolder, TargetFolder + @"\Gendarme.Framework.dll");
var frameworkAssembly = Path.Combine(baseFolder, TargetFolder, "Gendarme.Framework.dll");
var frameworkDefinition = AssemblyDefinition.ReadAssembly(frameworkAssembly);
var frameworkAssemblyRef = AssemblyNameReference.Parse(frameworkDefinition.Name.ToString());

var key = Path.Combine(baseFolder, StrongNameKey);
var assembly = Path.Combine(baseFolder, SourceFolder + @"\Gendarme.Rules.Maintainability.dll");
var newAssembly = Path.Combine(baseFolder, TargetFolder + @"\Gendarme.Rules.Maintainability.dll");
var assembly = Path.Combine(baseFolder, SourceFolder, "Gendarme.Rules.Maintainability.dll");
var newAssembly = Path.Combine(baseFolder, TargetFolder, "Gendarme.Rules.Maintainability.dll");

assembly = Path.GetFullPath(assembly);
newAssembly = Path.GetFullPath(newAssembly);
Expand Down Expand Up @@ -95,8 +100,8 @@ private static void SignGendarmeRulesMaintainability(string baseFolder)
private static void SignGendarmeFramework(string baseFolder)
{
var key = Path.Combine(baseFolder, StrongNameKey);
var assembly = Path.Combine(baseFolder, SourceFolder + @"\Gendarme.Framework.dll");
var newAssembly = Path.Combine(baseFolder, TargetFolder + @"\Gendarme.Framework.dll");
var assembly = Path.Combine(baseFolder, SourceFolder, "Gendarme.Framework.dll");
var newAssembly = Path.Combine(baseFolder, TargetFolder, "Gendarme.Framework.dll");

assembly = Path.GetFullPath(assembly);
newAssembly = Path.GetFullPath(newAssembly);
Expand Down
3 changes: 2 additions & 1 deletion main/OpenCover.Gendarme.Signer/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Mono.Cecil" version="0.9.5.4" targetFramework="net45" />
</packages>
<package id="Mono.Gendarme" version="2.11.0.20121120" targetFramework="net40" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
2 changes: 1 addition & 1 deletion main/OpenCover.Specs/OpenCover.Specs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
2 changes: 1 addition & 1 deletion main/OpenCover.Specs/Steps/PackagingSteps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void DeleteMsiFolder()

private static dynamic GetTargetPackage(string folder, string ext)
{
var files = Directory.EnumerateFiles(Path.Combine(Environment.CurrentDirectory, @"..\..\..\bin", folder), string.Format("*.{0}", ext));
var files = Directory.EnumerateFiles(Path.Combine(Environment.CurrentDirectory, "..", "..", "..", "bin", folder), string.Format("*.{0}", ext));

var target = files.Select(f => Regex.Match(f, string.Format(@".*\.(?<version>\d+\.\d+\.\d+)(-rc(?<revision>\d+))?\.{0}", ext)))
.Select(m => new { File = m.Value, Version = m.Groups["version"].Value, Revision = m.Groups["revision"].Value })
Expand Down
2 changes: 1 addition & 1 deletion main/OpenCover.Support/OpenCover.Support.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down
2 changes: 1 addition & 1 deletion main/OpenCover.Test/OpenCover.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down

0 comments on commit b595688

Please sign in to comment.