Skip to content

Commit 4fe6268

Browse files
committed
Merge branch 'release/0.8.0'
* release/0.8.0: (34 commits) (GH-124) Added new label verb (build) Change casing of NuGet Id (build) Switch to jsdeliver icon URLs (GH-116) Added the global tool project (doc) Added additional information to parameters (GH-121) Modified tests to match changes (GH-121) Append closed parameter to URL (GH-119) Corrected casing check (GH-120) Corrected parts identification updated documentation Implemented the access token option (build) Switch to using dotnet cli for build (doc) Updated copyright (build) Renamed setup.cake to recipe.cake (build) Renamed AppVeyor yml file (build) Added header for AppVeyor section (build) Remove pinning of specific version of Cake.Recipe (build) Switch to AppVeyor feed (build) Ensure CodeCoverage report is generated (build) Removed Outputpath ...
2 parents 0649119 + 6adce84 commit 4fe6268

File tree

49 files changed

+763
-854
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+763
-854
lines changed

appveyor.yml renamed to .appveyor.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#---------------------------------#
2+
# Build Image #
3+
#---------------------------------#
4+
image: Visual Studio 2017
5+
16
#---------------------------------#
27
# Build Script #
38
#---------------------------------#

Source/GitReleaseManager.Cli/AssemblyInfo.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<PropertyGroup>
3+
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
4+
</PropertyGroup>
5+
</Project>

Source/GitReleaseManager.Cli/FodyWeavers.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 17 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
1-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProjectGuid>{F1163F09-3D4E-4F95-AF46-24C15AB297FB}</ProjectGuid>
73
<OutputType>Exe</OutputType>
8-
<AppDesignerFolder>Properties</AppDesignerFolder>
9-
<RootNamespace>GitReleaseManager.Cli</RootNamespace>
104
<AssemblyName>GitReleaseManager</AssemblyName>
11-
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
12-
<FileAlignment>512</FileAlignment>
13-
<NuGetPackageImportStamp>
14-
</NuGetPackageImportStamp>
15-
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
16-
<RestorePackages>true</RestorePackages>
5+
<TargetFrameworks>netcoreapp2.0;net451</TargetFrameworks>
176
<BuildToolsFxCopVersion>1.0.1</BuildToolsFxCopVersion>
18-
<TargetFrameworkProfile />
197
<IsWebBootstrapper>false</IsWebBootstrapper>
208
<PublishUrl>publish\</PublishUrl>
219
<Install>true</Install>
@@ -31,75 +19,29 @@
3119
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
3220
<UseApplicationTrust>false</UseApplicationTrust>
3321
<BootstrapperEnabled>true</BootstrapperEnabled>
34-
</PropertyGroup>
35-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
36-
<PlatformTarget>AnyCPU</PlatformTarget>
37-
<DebugSymbols>true</DebugSymbols>
38-
<DebugType>full</DebugType>
39-
<Optimize>false</Optimize>
40-
<OutputPath>..\..\BuildArtifacts\</OutputPath>
41-
<DefineConstants>DEBUG;TRACE</DefineConstants>
42-
<ErrorReport>prompt</ErrorReport>
43-
<WarningLevel>4</WarningLevel>
22+
<Title>GitReleaseManager.Cli</Title>
23+
<Description>Create release notes in markdown given a GitHub milestone</Description>
4424
<RunCodeAnalysis>False</RunCodeAnalysis>
45-
<CodeAnalysisRuleSet>..\GitReleaseManager.ruleset</CodeAnalysisRuleSet>
4625
<CodeAnalysisTreatWarningsAsErrors>True</CodeAnalysisTreatWarningsAsErrors>
26+
<CodeAnalysisRuleSet>..\GitReleaseManager.ruleset</CodeAnalysisRuleSet>
27+
<IsPackable>false</IsPackable>
28+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
29+
</PropertyGroup>
30+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
4731
<RunCodeAnalysisRestore>False</RunCodeAnalysisRestore>
4832
</PropertyGroup>
49-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
50-
<PlatformTarget>AnyCPU</PlatformTarget>
51-
<DebugType>pdbonly</DebugType>
52-
<Optimize>true</Optimize>
53-
<OutputPath>..\..\BuildArtifacts\</OutputPath>
54-
<DefineConstants>TRACE;</DefineConstants>
55-
<ErrorReport>prompt</ErrorReport>
56-
<WarningLevel>4</WarningLevel>
57-
<RunCodeAnalysis>False</RunCodeAnalysis>
58-
<CodeAnalysisRuleSet>..\GitReleaseManager.ruleset</CodeAnalysisRuleSet>
59-
<CodeAnalysisTreatWarningsAsErrors>True</CodeAnalysisTreatWarningsAsErrors>
60-
<RunCodeAnalysisRestore>true</RunCodeAnalysisRestore>
33+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
34+
<RunCodeAnalysisRestore>True</RunCodeAnalysisRestore>
6135
</PropertyGroup>
36+
<Import Project="..\..\BuildScripts\CodeAnalysis.props" Condition="Exists('..\..\BuildScripts\CodeAnalysis.props')" />
37+
<Import Project="..\..\BuildScripts\StyleCop.props" Condition="Exists('..\..\BuildScripts\StyleCop.props')" />
6238
<ItemGroup>
63-
<Reference Include="CommandLine, Version=2.0.275.0, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
64-
<HintPath>..\packages\CommandLineParser.2.0.275-beta\lib\net45\CommandLine.dll</HintPath>
65-
<Private>True</Private>
66-
</Reference>
67-
<Reference Include="Octokit, Version=0.17.0.0, Culture=neutral, processorArchitecture=MSIL">
68-
<HintPath>..\packages\Octokit.0.17.0\lib\net45\Octokit.dll</HintPath>
69-
<Private>True</Private>
70-
</Reference>
71-
<Reference Include="System" />
72-
<Reference Include="System.Core" />
7339
<Reference Include="System.Net.Http" />
74-
<Reference Include="System.Xml.Linq" />
7540
<Reference Include="System.Data.DataSetExtensions" />
7641
<Reference Include="Microsoft.CSharp" />
77-
<Reference Include="System.Data" />
78-
<Reference Include="System.Xml" />
7942
</ItemGroup>
8043
<ItemGroup>
81-
<Compile Include="AssemblyInfo.cs" />
82-
<Compile Include="GlobalSuppressions.cs" />
83-
<Compile Include="Options\AddAssetSubOptions.cs" />
84-
<Compile Include="Options\BaseGitHubSubOptions.cs" />
85-
<Compile Include="Options\BaseSubOptions.cs" />
86-
<Compile Include="Options\CloseSubOptions.cs" />
87-
<Compile Include="Options\CreateSubOptions.cs" />
88-
<Compile Include="Options\ExportSubOptions.cs" />
89-
<Compile Include="Options\InitSubOptions.cs" />
90-
<Compile Include="Options\MainOptions.cs" />
91-
<Compile Include="Options\PublishSubOptions.cs" />
92-
<Compile Include="Options\ShowConfigSubOptions.cs" />
93-
<Compile Include="..\SolutionInfo.cs">
94-
<Link>SolutionInfo.cs</Link>
95-
</Compile>
96-
</ItemGroup>
97-
<ItemGroup>
98-
<None Include="app.config" />
99-
<None Include="packages.config">
100-
<SubType>Designer</SubType>
101-
</None>
102-
<Compile Include="Program.cs" />
44+
<Compile Include="..\SolutionInfo.cs" Link="SolutionInfo.cs" />
10345
</ItemGroup>
10446
<ItemGroup>
10547
<CodeAnalysisDictionary Include="..\CustomDictionary.xml">
@@ -108,29 +50,10 @@
10850
</CodeAnalysisDictionary>
10951
</ItemGroup>
11052
<ItemGroup>
111-
<BootstrapperPackage Include=".NETFramework,Version=v4.5.1">
112-
<Visible>False</Visible>
113-
<ProductName>Microsoft .NET Framework 4.5.1 %28x86 and x64%29</ProductName>
114-
<Install>true</Install>
115-
</BootstrapperPackage>
116-
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
117-
<Visible>False</Visible>
118-
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
119-
<Install>false</Install>
120-
</BootstrapperPackage>
121-
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
122-
<Visible>False</Visible>
123-
<ProductName>.NET Framework 3.5 SP1</ProductName>
124-
<Install>false</Install>
125-
</BootstrapperPackage>
53+
<ProjectReference Include="..\GitReleaseManager\GitReleaseManager.Core.csproj" />
12654
</ItemGroup>
12755
<ItemGroup>
128-
<ProjectReference Include="..\GitReleaseManager\GitReleaseManager.Core.csproj">
129-
<Project>{b02a026e-ca3a-48f4-bba9-eb337b0a2035}</Project>
130-
<Name>GitReleaseManager.Core</Name>
131-
</ProjectReference>
56+
<PackageReference Include="CommandLineParser" Version="2.3.0" />
57+
<PackageReference Include="Octokit" Version="0.32.0" />
13258
</ItemGroup>
133-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
134-
<Import Project="..\..\BuildScripts\CodeAnalysis.props" Condition="Exists('..\..\BuildScripts\CodeAnalysis.props')" />
135-
<Import Project="..\..\BuildScripts\StyleCop.props" Condition="Exists('..\..\BuildScripts\StyleCop.props')" />
13659
</Project>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<AssemblyName>GitReleaseManager</AssemblyName>
6+
7+
<PackAsTool>true</PackAsTool>
8+
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
9+
<ToolCommandName>dotnet-gitreleasemanager</ToolCommandName>
10+
<PackageId>GitReleaseManager.Tool</PackageId>
11+
12+
<Title>GitReleaseManager Tool</Title>
13+
<Authors>GitTools Contributors</Authors>
14+
<PackageProjectUrl>https://github.com/GitTools/GitReleaseManager</PackageProjectUrl>
15+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
16+
<PackageTags>github release notes create export</PackageTags>
17+
<Description>Tool for creating and exporting releases for software applications hosted on GitHub.</Description>
18+
<Copyright>Copyright (c) 2015 - Present - GitTools Contributors</Copyright>
19+
<PackageLicenseUrl>http://www.opensource.org/licenses/mit-license.php</PackageLicenseUrl>
20+
<PackageIconUrl>https://cdn.jsdelivr.net/gh/GitTools/GitReleaseManager@9c547452a10afaf83fce1b5833f4762487b017b7/Icons/package_icon.svg</PackageIconUrl>
21+
<PackageReleaseNotes>https://github.com/GitTools/GitReleaseManager/releases</PackageReleaseNotes>
22+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
23+
</PropertyGroup>
24+
25+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
26+
<RunCodeAnalysisRestore>False</RunCodeAnalysisRestore>
27+
</PropertyGroup>
28+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
29+
<RunCodeAnalysisRestore>True</RunCodeAnalysisRestore>
30+
</PropertyGroup>
31+
<Import Project="..\..\BuildScripts\CodeAnalysis.props" Condition="Exists('..\..\BuildScripts\CodeAnalysis.props')" />
32+
<Import Project="..\..\BuildScripts\StyleCop.props" Condition="Exists('..\..\BuildScripts\StyleCop.props')" />
33+
<ItemGroup>
34+
<Reference Include="System.Net.Http" />
35+
<Reference Include="System.Data.DataSetExtensions" />
36+
<Reference Include="Microsoft.CSharp" />
37+
</ItemGroup>
38+
<ItemGroup>
39+
<Compile Include="..\SolutionInfo.cs" Link="SolutionInfo.cs" />
40+
</ItemGroup>
41+
<ItemGroup>
42+
<CodeAnalysisDictionary Include="..\CustomDictionary.xml">
43+
<Link>CustomDictionary.xml</Link>
44+
<SubType>Designer</SubType>
45+
</CodeAnalysisDictionary>
46+
</ItemGroup>
47+
<ItemGroup>
48+
<ProjectReference Include="..\GitReleaseManager\GitReleaseManager.Core.csproj" />
49+
</ItemGroup>
50+
<ItemGroup>
51+
<PackageReference Include="CommandLineParser" Version="2.3.0" />
52+
<PackageReference Include="Octokit" Version="0.32.0" />
53+
</ItemGroup>
54+
</Project>

Source/GitReleaseManager.Cli/Options/BaseGitHubSubOptions.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ namespace GitReleaseManager.Cli.Options
1010

1111
public abstract class BaseGitHubSubOptions : BaseSubOptions
1212
{
13-
[Option('u', "username", HelpText = "The username to access GitHub with.", Required = true)]
13+
[Option('u', "username", HelpText = "The username to access GitHub with.", Required = true, SetName = "Basic Auth")]
1414
public string UserName { get; set; }
1515

16-
[Option('p', "password", HelpText = "The password to access GitHub with.", Required = true)]
16+
[Option('p', "password", HelpText = "The password to access GitHub with.", Required = true, SetName = "Basic Auth")]
1717
public string Password { get; set; }
1818

19+
[Option("token", HelpText = "The Access Token to access GitHub with.", Required = true, SetName = "OAuth flow")]
20+
public string Token { get; set; }
21+
1922
[Option('o', "owner", HelpText = "The owner of the repository.", Required = true)]
2023
public string RepositoryOwner { get; set; }
2124

@@ -24,7 +27,10 @@ public abstract class BaseGitHubSubOptions : BaseSubOptions
2427

2528
public GitHubClient CreateGitHubClient()
2629
{
27-
var credentials = new Credentials(this.UserName, this.Password);
30+
var credentials = string.IsNullOrWhiteSpace(Token)
31+
? new Credentials(UserName, Password)
32+
: new Credentials(Token);
33+
2834
var github = new GitHubClient(new ProductHeaderValue("GitReleaseManager")) { Credentials = credentials };
2935
return github;
3036
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//-----------------------------------------------------------------------
2+
// <copyright file="LabelSubOptions.cs" company="GitTools Contributors">
3+
// Copyright (c) 2015 - Present - GitTools Contributors
4+
// </copyright>
5+
//-----------------------------------------------------------------------
6+
7+
namespace GitReleaseManager.Cli.Options
8+
{
9+
using CommandLine;
10+
11+
[Verb("label", HelpText = "Deletes existing labels and replaces with set of default labels.")]
12+
public class LabelSubOptions : BaseGitHubSubOptions
13+
{
14+
}
15+
}

Source/GitReleaseManager.Cli/Options/MainOptions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public class MainOptions
2222

2323
public ShowConfigSubOptions ShowConfigVerb { get; set; }
2424

25+
public LabelSubOptions LabelVerb { get; set; }
26+
2527
////[HelpVerbOption]
2628
////public string DoHelpForVerb(string verbName)
2729
////{

0 commit comments

Comments
 (0)