Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

Commit 2c25f80

Browse files
committed
Version bump
1 parent b013619 commit 2c25f80

File tree

5 files changed

+34
-8
lines changed

5 files changed

+34
-8
lines changed

samples/VS2017/SpecFlow 2.1.0/net461/Sample.Website.Tests.MsTest/Sample.Website.Tests.MSTest.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<Description>Sample.Website.Tests Class Library</Description>
@@ -36,7 +36,8 @@
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+

samples/VS2017/SpecFlow 2.1.0/net461/Sample.Website.Tests.NUnit/Sample.Website.Tests.NUnit.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<Description>Sample.Website.Tests Class Library</Description>
@@ -36,7 +36,8 @@
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+

samples/VS2017/SpecFlow 2.1.0/net461/Sample.Website.Tests.XUnit/Sample.Website.Tests.XUnit.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<Description>Sample.Website.Tests Class Library</Description>
@@ -36,7 +36,8 @@
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+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
}

src/SpecFlow.NetCore/SpecFlow.NetCore.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
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>
@@ -40,7 +40,7 @@
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>

0 commit comments

Comments
 (0)