Skip to content

Commit

Permalink
#56 support 6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jmecosta committed Mar 19, 2017
1 parent f651a91 commit 60edf63
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</Content>
<Compile Include="VSSolutionUtilsTest.fs" />
<None Include="app.config" />
<None Include="packages.config" />
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="Foq">
Expand All @@ -83,7 +83,7 @@
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="mscorlib" />
<Reference Include="nunit.framework">
<HintPath>..\..\packages\NUnit.3.0.0-rc\lib\net45\nunit.framework.dll</HintPath>
<HintPath>..\..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Common/MsbuildTaskUtils.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.0.0-rc" targetFramework="net45" />
<package id="NUnit" version="3.6.1" targetFramework="net45" />
</packages>
12 changes: 5 additions & 7 deletions CppTasks/CppCheckTask.Test/CppCheckMSBuildTask.Test.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<ItemGroup>
<Compile Include="CppCheckTaskTest.fs" />
<None Include="app.config" />
<None Include="packages.config" />
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="Foq">
Expand All @@ -70,20 +70,18 @@
<Reference Include="Microsoft.Build.Framework" />
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="mscorlib" />
<Reference Include="nunit.framework">
<HintPath>..\..\packages\NUnit.3.0.0-rc\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<SpecificVersion>True</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\MsbuildTaskUtils\MsbuildUtilityHelpers.fsproj">
<Name>MsbuildUtilityHelpers</Name>
<Project>{8e7d4ac9-ab34-4f3a-bfc6-7bc7b9aac9ae}</Project>
Expand Down
2 changes: 1 addition & 1 deletion CppTasks/CppCheckTask.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.0.0-rc" targetFramework="net45" />
<package id="NUnit" version="3.6.1" targetFramework="net452" />
</packages>
4 changes: 2 additions & 2 deletions CppTasks/CppLintTask.Test/CppLintMSBuildTask.Test.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<ItemGroup>
<Compile Include="CppLintTaskTest.fs" />
<None Include="app.config" />
<None Include="packages.config" />
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CppLintTask\CppLintMSBuildTask.fsproj">
Expand All @@ -82,7 +82,7 @@
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="mscorlib" />
<Reference Include="nunit.framework">
<HintPath>..\..\packages\NUnit.3.0.0-rc\lib\net45\nunit.framework.dll</HintPath>
<HintPath>..\..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion CppTasks/CppLintTask.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.0.0-rc" targetFramework="net45" />
<package id="NUnit" version="3.6.1" targetFramework="net452" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<Content Include="testdata/project1.vcxproj">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="packages.config" />
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GtestXunitConverterTask\GtestRunnerMSBuildTask.fsproj">
Expand All @@ -100,7 +100,7 @@
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="mscorlib" />
<Reference Include="nunit.framework">
<HintPath>..\..\packages\NUnit.3.0.0-rc\lib\net45\nunit.framework.dll</HintPath>
<HintPath>..\..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion CppTasks/GtestXunitConverterTask.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.0.0-rc" targetFramework="net45" />
<package id="NUnit" version="3.6.1" targetFramework="net452" />
</packages>
4 changes: 2 additions & 2 deletions CppTasks/RatsTask.Test/RatsTask.Test.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="app.config" />
<None Include="packages.config" />
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="Foq">
Expand All @@ -74,7 +74,7 @@
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="mscorlib" />
<Reference Include="nunit.framework">
<HintPath>..\..\packages\NUnit.3.0.0-rc\lib\net45\nunit.framework.dll</HintPath>
<HintPath>..\..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion CppTasks/RatsTask.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.0.0-rc" targetFramework="net45" />
<package id="NUnit" version="3.6.1" targetFramework="net452" />
</packages>
4 changes: 2 additions & 2 deletions CppTasks/VeraTask.Test/VeraTask.Test.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<ItemGroup>
<Compile Include="VeraTaskTest.fs" />
<None Include="app.config" />
<None Include="packages.config" />
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\MsbuildTaskUtils\MsbuildUtilityHelpers.fsproj">
Expand All @@ -83,7 +83,7 @@
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="mscorlib" />
<Reference Include="nunit.framework">
<HintPath>..\..\packages\NUnit.3.0.0-rc\lib\net45\nunit.framework.dll</HintPath>
<HintPath>..\..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion CppTasks/VeraTask.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.0.0-rc" targetFramework="net45" />
<package id="NUnit" version="3.6.1" targetFramework="net452" />
</packages>
Binary file added CxxSonarQubeMsbuidRunner.zip
Binary file not shown.
16 changes: 9 additions & 7 deletions CxxSonarQubeMsbuidRunner/CxxSonarQubeMsbuidRunner.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,28 @@
<Private>True</Private>
</ProjectReference>
<Reference Include="FSharp.Data">
<HintPath>..\refs\FSharp.Data.dll</HintPath>
<HintPath>..\packages\VSSonarExtensionPlugin3Api.6.1.0\lib\FSharp.Data.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FSharp.Data.DesignTime">
<HintPath>..\refs\FSharp.Data.DesignTime.dll</HintPath>
<HintPath>..\packages\VSSonarExtensionPlugin3Api.6.1.0\lib\FSharp.Data.DesignTime.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="MsbuildAutomationHelper">
<HintPath>..\packages\MsbuildAutomationHelper.1.2\lib\MsbuildAutomationHelper.dll</HintPath>
<HintPath>..\packages\VSSonarExtensionPlugin3Api.6.1.0\lib\MsbuildAutomationHelper.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="RestSharp">
<HintPath>..\packages\VSSonarExtensionPlugin3Api.5.0.6\lib\RestSharp.dll</HintPath>
<HintPath>..\packages\VSSonarExtensionPlugin3Api.6.1.0\lib\RestSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SonarRestService">
<HintPath>..\packages\VSSonarExtensionPlugin3Api.5.0.6\lib\SonarRestService.dll</HintPath>
<HintPath>..\packages\VSSonarExtensionPlugin3Api.6.1.0\lib\SonarRestService.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down Expand Up @@ -143,11 +145,11 @@
<Private>True</Private>
</ProjectReference>
<Reference Include="VSSonarPlugins">
<HintPath>..\packages\VSSonarExtensionPlugin3Api.5.0.6\lib\VSSonarPlugins.dll</HintPath>
<HintPath>..\packages\VSSonarExtensionPlugin3Api.6.1.0\lib\VSSonarPlugins.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="VSSonarQubeCmdExecutor">
<HintPath>..\packages\VSSonarExtensionPlugin3Api.5.0.6\lib\VSSonarQubeCmdExecutor.dll</HintPath>
<HintPath>..\packages\VSSonarExtensionPlugin3Api.6.1.0\lib\VSSonarQubeCmdExecutor.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
Expand Down
33 changes: 18 additions & 15 deletions CxxSonarQubeMsbuidRunner/Options.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ open System.IO
open System.IO.Compression
open System.Text
open System.Net
open System.Linq
open System.Text.RegularExpressions
open System.Diagnostics
open System.Reflection
Expand Down Expand Up @@ -641,27 +642,29 @@ type OptionsData(args : string []) =
printf "[CxxSonarQubeMsbuidRunner] New project was provisioned correctly %s \r\n" key
new Resource(Key = key + ":" + this.Branch, BranchName = this.Branch)

// duplicate main branch props to branch
let propertiesofMainBranch = (rest :> ISonarRestService).GetProperties(token, projectParent.[0])
// duplicate main branch props to branch
let propertiesofMainBranch = (rest :> ISonarRestService).GetSettings(token, projectParent.[0]).ToList()
printf "[CxxSonarQubeMsbuidRunner] Duplicating %i properties from master\r\n" propertiesofMainBranch.Count
for prop in propertiesofMainBranch do
let errormsg = (rest :> ISonarRestService).UpdateProperty(token, prop.Key, prop.Value, branchProject)
let errormsg = (rest :> ISonarRestService).SetSetting(token, prop, branchProject)
if errormsg <> "" then
printf "[CxxSonarQubeMsbuidRunner] Failed to apply prop %s : %s\r\n" prop.Key errormsg
printf "[CxxSonarQubeMsbuidRunner] %s : %s \r\n" prop.key errormsg


// clean any prop that is not in main
let propertiesofBranch = (rest :> ISonarRestService).GetProperties(token, branchProject)
for prop in propertiesofBranch do
if propertiesofMainBranch.ContainsKey(prop.Key) && not(propertiesofMainBranch.[prop.Key].Equals(prop.Value)) then
let errormsg = (rest :> ISonarRestService).UpdateProperty(token, prop.Key, propertiesofMainBranch.[prop.Key], branchProject)
if errormsg <> "" then
printf "[CxxSonarQubeMsbuidRunner] Failed to apply updated value from main branch : prop %s : %s\r\n" prop.Key errormsg

if not(propertiesofMainBranch.ContainsKey(prop.Key)) then
let errormsg = (rest :> ISonarRestService).UpdateProperty(token, prop.Key, "", branchProject)
if errormsg <> "" then
printf "[CxxSonarQubeMsbuidRunner] Failed to clear prop %s : %s\r\n" prop.Key errormsg
//let propertiesofBranch = (rest :> ISonarRestService).GetSettings(token, branchProject).ToList()
//for prop in propertiesofBranch do
// if propertiesofMainBranch.ContainsKey(prop.Key) && not(propertiesofMainBranch.[prop.Key].Equals(prop.Value)) then
// let errormsg = (rest :> ISonarRestService).UpdateProperty(token, prop.Key, propertiesofMainBranch.[prop.Key], branchProject)
// if errormsg <> "" then
// printf "[CxxSonarQubeMsbuidRunner] Failed to apply updated value from main branch : prop %s : %s\r\n" prop.Key errormsg
// else
// printf "[CxxSonarQubeMsbuidRunner] Applied updated value from main branch : prop %s : %s\r\n" prop.Key prop.Value

// if not(propertiesofMainBranch.ContainsKey(prop.Key)) then
// let errormsg = (rest :> ISonarRestService).UpdateProperty(token, prop.Key, "", branchProject)
// if errormsg <> "" then
// printf "[CxxSonarQubeMsbuidRunner] Failed to clear prop %s : %s\r\n" prop.Key errormsg

// ensure same quality profiles are in used by both branches
let profiles = (rest :> ISonarRestService).GetQualityProfilesForProject(token, projectParent.[0])
Expand Down
3 changes: 1 addition & 2 deletions CxxSonarQubeMsbuidRunner/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MsbuildAutomationHelper" version="1.2" targetFramework="net452" />
<package id="VSSonarExtensionPlugin3Api" version="5.0.6" targetFramework="net452" />
<package id="VSSonarExtensionPlugin3Api" version="6.1.0" targetFramework="net452" />
</packages>

0 comments on commit 60edf63

Please sign in to comment.