This repository was archived by the owner on Nov 7, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +34
-8
lines changed
samples/VS2017/SpecFlow 2.1.0/net461
Sample.Website.Tests.MsTest
Sample.Website.Tests.NUnit
Sample.Website.Tests.XUnit Expand file tree Collapse file tree 5 files changed +34
-8
lines changed Original file line number Diff line number Diff line change 1- <Project Sdk =" Microsoft.NET.Sdk" >
1+ <Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
44 <Description >Sample.Website.Tests Class Library</Description >
3636 </Target >
3737
3838 <ItemGroup >
39- <DotNetCliToolReference Include =" SpecFlow.NetCore" Version =" 1.2 .0" />
39+ <DotNetCliToolReference Include =" SpecFlow.NetCore" Version =" 1.3 .0" />
4040 </ItemGroup >
4141
4242</Project >
43+
Original file line number Diff line number Diff line change 1- <Project Sdk =" Microsoft.NET.Sdk" >
1+ <Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
44 <Description >Sample.Website.Tests Class Library</Description >
3636 </Target >
3737
3838 <ItemGroup >
39- <DotNetCliToolReference Include =" SpecFlow.NetCore" Version =" 1.2 .0" />
39+ <DotNetCliToolReference Include =" SpecFlow.NetCore" Version =" 1.3 .0" />
4040 </ItemGroup >
4141
4242</Project >
43+
Original file line number Diff line number Diff line change 1- <Project Sdk =" Microsoft.NET.Sdk" >
1+ <Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
44 <Description >Sample.Website.Tests Class Library</Description >
3636 </Target >
3737
3838 <ItemGroup >
39- <DotNetCliToolReference Include =" SpecFlow.NetCore" Version =" 1.2 .0" />
39+ <DotNetCliToolReference Include =" SpecFlow.NetCore" Version =" 1.3 .0" />
4040 </ItemGroup >
4141
4242</Project >
43+
Original file line number Diff line number Diff line change 1+ Param (
2+ [Parameter (Mandatory = $true )][string ]$Version
3+ )
4+
5+ $testProjectFolders = Get-ChildItem - Filter " Sample.Website.Tests.*"
6+
7+ foreach ($folder in $testProjectFolders ) {
8+
9+ $files = $folder | Get-ChildItem | where { $_.Name.EndsWith (" .csproj" ) }
10+
11+ foreach ($file in $files ) {
12+ # Read version by XML.
13+ $xml = [xml ](Get-Content $file.FullName )
14+ $oldVersion = $xml.SelectSingleNode (' //ItemGroup/DotNetCliToolReference' ).GetAttribute(" Version" )
15+
16+ # But just string replace to preserve formatting.
17+ $content = Get-Content $file.FullName - Raw
18+ $oldNode = " <DotNetCliToolReference Include="" SpecFlow.NetCore"" Version="" $oldVersion "" />"
19+ $newNode = " <DotNetCliToolReference Include="" SpecFlow.NetCore"" Version="" $Version "" />"
20+ $content = $content.Replace ($oldNode , $newNode )
21+ [System.IO.File ]::WriteAllText($file.FullName , $content )
22+ }
23+ }
Original file line number Diff line number Diff line change 2020 <GenerateAssemblyProductAttribute >false</GenerateAssemblyProductAttribute >
2121 <GenerateAssemblyCopyrightAttribute >false</GenerateAssemblyCopyrightAttribute >
2222 <PackageReleaseNotes ></PackageReleaseNotes >
23- <Version >1.2 .0</Version >
23+ <Version >1.3 .0</Version >
2424 </PropertyGroup >
2525
2626 <ItemGroup >
4040
4141 <Target Name =" PostBuild" AfterTargets =" PostBuildEvent" >
4242 <!-- Ignore errors from the build event being triggered multiple times (per framework) and file locking the nuspec. First one wins. -->
43- <Exec Command =" dotnet pack --no-build --output ../../.local-nuget" ContinueOnError =" true" IgnoreExitCode =" true" IgnoreStandardErrorWarningFormat =" true" />
43+ <Exec Command =" dotnet pack -c Release - -no-build --output ../../.local-nuget" ContinueOnError =" true" IgnoreExitCode =" true" IgnoreStandardErrorWarningFormat =" true" />
4444 </Target >
4545
4646</Project >
You can’t perform that action at this time.
0 commit comments