Skip to content

Commit fe0f957

Browse files
committed
Merge pull request #74 from gep13/Issue-59
(GH-59) Getting versioning working correctly
2 parents ebf1bb1 + 8669cbf commit fe0f957

13 files changed

+70
-126
lines changed

BuildScripts/default.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ properties {
99
$nugetExe = "..\Tools\NuGet\NuGet.exe";
1010
$projectName = "GitReleaseManager";
1111
$openCoverExe = "..\Source\packages\OpenCover.4.5.3723\OpenCover.Console.exe";
12-
$nunitConsoleExe = "..\Source\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe";
12+
$nunitConsoleExe = "..\Source\packages\NUnit.Console.3.0.1\tools\nunit3-console.exe";
1313
$reportGeneratorExe = "..\Source\packages\ReportGenerator.2.1.8.0\tools\ReportGenerator.exe";
1414
$coverallsExe = "..\Source\packages\coveralls.io.1.3.4\tools\coveralls.net.exe";
1515
$publishCoverityExe = "..\Source\packages\PublishCoverity.0.10.0\PublishCoverity.exe";
@@ -415,7 +415,7 @@ Task -Name RunGitVersion -Depends __InstallGitVersion -Description "Execute the
415415
exec {
416416
if(isAppVeyor) {
417417
Write-Output "Running on AppVeyor, so UpdateAssemblyInfo will be called."
418-
& $gitVersionExe /output buildserver /UpdateAssemblyInfo true
418+
& $gitVersionExe $rootDirectory /output buildserver /UpdateAssemblyInfo true
419419
$script:version = $env:GitVersion_LegacySemVerPadded
420420
} else {
421421
$output = & $gitVersionExe
@@ -593,7 +593,7 @@ Task -Name RunCodeCoverage -Description "Use OpenCover, NUnit and Coveralls to a
593593

594594
exec {
595595
Write-Output "Running OpenCover...";
596-
& $openCoverExe -target:$nunitConsoleExe -targetargs:`"$buildArtifactsDirectory\GitReleaseManager.Tests.dll /noshadow /nologo`" -filter:`"+[GitReleaseManager]GitReleaseManager*`" -excludebyattribute:`"System.CodeDom.Compiler.GeneratedCodeAttribute`" -register:user -output:`"$buildArtifactsDirectory\coverage.xml`";
596+
& $openCoverExe -target:$nunitConsoleExe -targetargs:`"$buildArtifactsDirectory\GitReleaseManager.Tests.dll`" -filter:`"+[GitReleaseManager]GitReleaseManager*`" -excludebyattribute:`"System.CodeDom.Compiler.GeneratedCodeAttribute`" -register:user -output:`"$buildArtifactsDirectory\coverage.xml`";
597597
Write-Output "OpenCover Complete";
598598

599599
Write-Output "Running ReportGenerator...";

Source/.nuget/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="coveralls.io" version="1.3.4" />
4-
<package id="NUnit.Runners" version="2.6.4" />
4+
<package id="NUnit.Console" version="3.0.1" />
55
<package id="OpenCover" version="4.5.3723" />
66
<package id="PublishCoverity" version="0.10.0" />
77
<package id="ReportGenerator" version="2.1.8.0" />

Source/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<RestorePackages>true</RestorePackages>
1818
<BuildToolsFxCopVersion>1.0.1</BuildToolsFxCopVersion>
1919
<TargetFrameworkProfile />
20+
<IsWebBootstrapper>false</IsWebBootstrapper>
2021
<PublishUrl>publish\</PublishUrl>
2122
<Install>true</Install>
2223
<InstallFrom>Disk</InstallFrom>
@@ -29,7 +30,6 @@
2930
<MapFileExtensions>true</MapFileExtensions>
3031
<ApplicationRevision>0</ApplicationRevision>
3132
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
32-
<IsWebBootstrapper>false</IsWebBootstrapper>
3333
<UseApplicationTrust>false</UseApplicationTrust>
3434
<BootstrapperEnabled>true</BootstrapperEnabled>
3535
</PropertyGroup>
@@ -59,8 +59,9 @@
5959
<CodeAnalysisTreatWarningsAsErrors>True</CodeAnalysisTreatWarningsAsErrors>
6060
</PropertyGroup>
6161
<ItemGroup>
62-
<Reference Include="CommandLine">
63-
<HintPath>..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll</HintPath>
62+
<Reference Include="CommandLine, Version=2.0.275.0, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
63+
<HintPath>..\packages\CommandLineParser.2.0.275-beta\lib\net45\CommandLine.dll</HintPath>
64+
<Private>True</Private>
6465
</Reference>
6566
<Reference Include="Octokit, Version=0.17.0.0, Culture=neutral, processorArchitecture=MSIL">
6667
<HintPath>..\packages\Octokit.0.17.0\lib\net45\Octokit.dll</HintPath>
@@ -135,11 +136,11 @@
135136
</PropertyGroup>
136137
<Error Condition="!Exists('..\packages\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets'))" />
137138
<Error Condition="!Exists('..\packages\StyleCop.Error.MSBuild.1.0.0\build\StyleCop.Error.MSBuild.Targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\StyleCop.Error.MSBuild.1.0.0\build\StyleCop.Error.MSBuild.Targets'))" />
138-
<Error Condition="!Exists('..\packages\Fody.1.29.3\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.29.3\build\dotnet\Fody.targets'))" />
139+
<Error Condition="!Exists('..\packages\Fody.1.29.4\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.29.4\build\dotnet\Fody.targets'))" />
139140
</Target>
140141
<Import Project="..\..\BuildScripts\CodeAnalysis.props" Condition="Exists('..\..\BuildScripts\CodeAnalysis.props')" />
141142
<Import Project="..\..\BuildScripts\StyleCop.props" Condition="Exists('..\..\BuildScripts\StyleCop.props')" />
142143
<Import Project="..\packages\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('..\packages\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
143144
<Import Project="..\packages\StyleCop.Error.MSBuild.1.0.0\build\StyleCop.Error.MSBuild.Targets" Condition="Exists('..\packages\StyleCop.Error.MSBuild.1.0.0\build\StyleCop.Error.MSBuild.Targets')" />
144-
<Import Project="..\packages\Fody.1.29.3\build\dotnet\Fody.targets" Condition="Exists('..\packages\Fody.1.29.3\build\dotnet\Fody.targets')" />
145+
<Import Project="..\packages\Fody.1.29.4\build\dotnet\Fody.targets" Condition="Exists('..\packages\Fody.1.29.4\build\dotnet\Fody.targets')" />
145146
</Project>

Source/GitReleaseManager.Cli/Options/AddAssetSubOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
namespace GitReleaseManager.Cli.Options
88
{
99
using System.Collections.Generic;
10-
1110
using CommandLine;
1211

12+
[Verb("addasset", HelpText = "Adds an asset to an existing release.")]
1313
public class AddAssetSubOptions : BaseGitHubSubOptions
1414
{
15-
[OptionList('a', "assets", Separator = ',', HelpText = "Paths to the files to include in the release.", Required = true)]
15+
[Option('a', "assets", Separator = ',', HelpText = "Paths to the files to include in the release.", Required = true)]
1616
public IList<string> AssetPaths { get; set; }
1717

1818
[Option('t', "tagName", HelpText = "The name of the release (Typically this is the generated SemVer Version Number).", Required = true)]

Source/GitReleaseManager.Cli/Options/CloseSubOptions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace GitReleaseManager.Cli.Options
88
{
99
using CommandLine;
1010

11+
[Verb("close", HelpText = "Closes the milestone.")]
1112
public class CloseSubOptions : BaseGitHubSubOptions
1213
{
1314
[Option('m', "milestone", HelpText = "The milestone to use.", Required = true)]

Source/GitReleaseManager.Cli/Options/CreateSubOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
namespace GitReleaseManager.Cli.Options
88
{
99
using System.Collections.Generic;
10-
1110
using CommandLine;
1211

12+
[Verb("create", HelpText = "Creates a draft release notes from a milestone.")]
1313
public class CreateSubOptions : BaseGitHubSubOptions
1414
{
15-
[OptionList('a', "assets", Separator = ',', HelpText = "Paths to the files to include in the release.", Required = false)]
15+
[Option('a', "assets", Separator = ',', HelpText = "Paths to the files to include in the release.", Required = false)]
1616
public IList<string> AssetPaths { get; set; }
1717

1818
[Option('c', "targetcommitish", HelpText = "The commit to tag. Can be a branch or SHA. Defaults to repository's default branch.", Required = false)]

Source/GitReleaseManager.Cli/Options/ExportSubOptions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace GitReleaseManager.Cli.Options
88
{
99
using CommandLine;
1010

11+
[Verb("export", HelpText = "Exports all the Release Notes in markdown format.")]
1112
public class ExportSubOptions : BaseGitHubSubOptions
1213
{
1314
[Option('f', "fileOutputPath", HelpText = "Path to the file export releases.", Required = true)]

Source/GitReleaseManager.Cli/Options/InitSubOptions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
namespace GitReleaseManager.Cli.Options
88
{
9+
using CommandLine;
10+
11+
[Verb("init", HelpText = "Creates a sample Yaml Configuration file in root directory")]
912
public class InitSubOptions : BaseSubOptions
1013
{
1114
}

Source/GitReleaseManager.Cli/Options/MainOptions.cs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,26 @@
66

77
namespace GitReleaseManager.Cli.Options
88
{
9-
using CommandLine;
10-
using CommandLine.Text;
11-
129
public class MainOptions
1310
{
14-
[VerbOption("create", HelpText = "Creates a draft release notes from a milestone.")]
1511
public CreateSubOptions CreateVerb { get; set; }
1612

17-
[VerbOption("addasset", HelpText = "Adds an asset to an existing release.")]
1813
public AddAssetSubOptions AddAssetVerb { get; set; }
1914

20-
[VerbOption("close", HelpText = "Closes the milestone.")]
2115
public CloseSubOptions CloseVerb { get; set; }
2216

23-
[VerbOption("publish", HelpText = "Publishes the release notes and closes the milestone.")]
2417
public PublishSubOptions PublishVerb { get; set; }
2518

26-
[VerbOption("export", HelpText = "Exports all the Release Notes in markdown format.")]
2719
public ExportSubOptions ExportVerb { get; set; }
2820

29-
[VerbOption("init", HelpText = "Creates a sample Yaml Configuration file in root directory")]
3021
public InitSubOptions InitVerb { get; set; }
3122

32-
[VerbOption("showconfig", HelpText = "Shows the current configuration")]
3323
public ShowConfigSubOptions ShowConfigVerb { get; set; }
3424

35-
[HelpVerbOption]
36-
public string DoHelpForVerb(string verbName)
37-
{
38-
return HelpText.AutoBuild(this, verbName);
39-
}
25+
////[HelpVerbOption]
26+
////public string DoHelpForVerb(string verbName)
27+
////{
28+
//// return HelpText.AutoBuild(this, verbName);
29+
////}
4030
}
4131
}

Source/GitReleaseManager.Cli/Options/PublishSubOptions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace GitReleaseManager.Cli.Options
88
{
99
using CommandLine;
1010

11+
[Verb("publish", HelpText = "Publishes the release notes and closes the milestone.")]
1112
public class PublishSubOptions : BaseGitHubSubOptions
1213
{
1314
[Option('t', "tagName", HelpText = "The name of the release (Typically this is the generated SemVer Version Number).", Required = true)]

0 commit comments

Comments
 (0)