Skip to content

Commit

Permalink
Merge branch 'release/0.8.0'
Browse files Browse the repository at this point in the history
* 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
  ...
  • Loading branch information
gep13 committed Dec 30, 2018
2 parents 0649119 + 6adce84 commit 4fe6268
Show file tree
Hide file tree
Showing 49 changed files with 763 additions and 854 deletions.
5 changes: 5 additions & 0 deletions appveyor.yml → .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#---------------------------------#
# Build Image #
#---------------------------------#
image: Visual Studio 2017

#---------------------------------#
# Build Script #
#---------------------------------#
Expand Down
16 changes: 0 additions & 16 deletions Source/GitReleaseManager.Cli/AssemblyInfo.cs

This file was deleted.

5 changes: 5 additions & 0 deletions Source/GitReleaseManager.Cli/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
</PropertyGroup>
</Project>
7 changes: 0 additions & 7 deletions Source/GitReleaseManager.Cli/FodyWeavers.xml

This file was deleted.

111 changes: 17 additions & 94 deletions Source/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F1163F09-3D4E-4F95-AF46-24C15AB297FB}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GitReleaseManager.Cli</RootNamespace>
<AssemblyName>GitReleaseManager</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworks>netcoreapp2.0;net451</TargetFrameworks>
<BuildToolsFxCopVersion>1.0.1</BuildToolsFxCopVersion>
<TargetFrameworkProfile />
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
Expand All @@ -31,75 +19,29 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\BuildArtifacts\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Title>GitReleaseManager.Cli</Title>
<Description>Create release notes in markdown given a GitHub milestone</Description>
<RunCodeAnalysis>False</RunCodeAnalysis>
<CodeAnalysisRuleSet>..\GitReleaseManager.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisTreatWarningsAsErrors>True</CodeAnalysisTreatWarningsAsErrors>
<CodeAnalysisRuleSet>..\GitReleaseManager.ruleset</CodeAnalysisRuleSet>
<IsPackable>false</IsPackable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<RunCodeAnalysisRestore>False</RunCodeAnalysisRestore>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\BuildArtifacts\</OutputPath>
<DefineConstants>TRACE;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>False</RunCodeAnalysis>
<CodeAnalysisRuleSet>..\GitReleaseManager.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisTreatWarningsAsErrors>True</CodeAnalysisTreatWarningsAsErrors>
<RunCodeAnalysisRestore>true</RunCodeAnalysisRestore>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<RunCodeAnalysisRestore>True</RunCodeAnalysisRestore>
</PropertyGroup>
<Import Project="..\..\BuildScripts\CodeAnalysis.props" Condition="Exists('..\..\BuildScripts\CodeAnalysis.props')" />
<Import Project="..\..\BuildScripts\StyleCop.props" Condition="Exists('..\..\BuildScripts\StyleCop.props')" />
<ItemGroup>
<Reference Include="CommandLine, Version=2.0.275.0, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
<HintPath>..\packages\CommandLineParser.2.0.275-beta\lib\net45\CommandLine.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Octokit, Version=0.17.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octokit.0.17.0\lib\net45\Octokit.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="Options\AddAssetSubOptions.cs" />
<Compile Include="Options\BaseGitHubSubOptions.cs" />
<Compile Include="Options\BaseSubOptions.cs" />
<Compile Include="Options\CloseSubOptions.cs" />
<Compile Include="Options\CreateSubOptions.cs" />
<Compile Include="Options\ExportSubOptions.cs" />
<Compile Include="Options\InitSubOptions.cs" />
<Compile Include="Options\MainOptions.cs" />
<Compile Include="Options\PublishSubOptions.cs" />
<Compile Include="Options\ShowConfigSubOptions.cs" />
<Compile Include="..\SolutionInfo.cs">
<Link>SolutionInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<Compile Include="Program.cs" />
<Compile Include="..\SolutionInfo.cs" Link="SolutionInfo.cs" />
</ItemGroup>
<ItemGroup>
<CodeAnalysisDictionary Include="..\CustomDictionary.xml">
Expand All @@ -108,29 +50,10 @@
</CodeAnalysisDictionary>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.1 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<ProjectReference Include="..\GitReleaseManager\GitReleaseManager.Core.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GitReleaseManager\GitReleaseManager.Core.csproj">
<Project>{b02a026e-ca3a-48f4-bba9-eb337b0a2035}</Project>
<Name>GitReleaseManager.Core</Name>
</ProjectReference>
<PackageReference Include="CommandLineParser" Version="2.3.0" />
<PackageReference Include="Octokit" Version="0.32.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\BuildScripts\CodeAnalysis.props" Condition="Exists('..\..\BuildScripts\CodeAnalysis.props')" />
<Import Project="..\..\BuildScripts\StyleCop.props" Condition="Exists('..\..\BuildScripts\StyleCop.props')" />
</Project>
54 changes: 54 additions & 0 deletions Source/GitReleaseManager.Cli/GitReleaseManager.Tool.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<AssemblyName>GitReleaseManager</AssemblyName>

<PackAsTool>true</PackAsTool>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<ToolCommandName>dotnet-gitreleasemanager</ToolCommandName>
<PackageId>GitReleaseManager.Tool</PackageId>

<Title>GitReleaseManager Tool</Title>
<Authors>GitTools Contributors</Authors>
<PackageProjectUrl>https://github.com/GitTools/GitReleaseManager</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageTags>github release notes create export</PackageTags>
<Description>Tool for creating and exporting releases for software applications hosted on GitHub.</Description>
<Copyright>Copyright (c) 2015 - Present - GitTools Contributors</Copyright>
<PackageLicenseUrl>http://www.opensource.org/licenses/mit-license.php</PackageLicenseUrl>
<PackageIconUrl>https://cdn.jsdelivr.net/gh/GitTools/GitReleaseManager@9c547452a10afaf83fce1b5833f4762487b017b7/Icons/package_icon.svg</PackageIconUrl>
<PackageReleaseNotes>https://github.com/GitTools/GitReleaseManager/releases</PackageReleaseNotes>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<RunCodeAnalysisRestore>False</RunCodeAnalysisRestore>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<RunCodeAnalysisRestore>True</RunCodeAnalysisRestore>
</PropertyGroup>
<Import Project="..\..\BuildScripts\CodeAnalysis.props" Condition="Exists('..\..\BuildScripts\CodeAnalysis.props')" />
<Import Project="..\..\BuildScripts\StyleCop.props" Condition="Exists('..\..\BuildScripts\StyleCop.props')" />
<ItemGroup>
<Reference Include="System.Net.Http" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\SolutionInfo.cs" Link="SolutionInfo.cs" />
</ItemGroup>
<ItemGroup>
<CodeAnalysisDictionary Include="..\CustomDictionary.xml">
<Link>CustomDictionary.xml</Link>
<SubType>Designer</SubType>
</CodeAnalysisDictionary>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GitReleaseManager\GitReleaseManager.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.3.0" />
<PackageReference Include="Octokit" Version="0.32.0" />
</ItemGroup>
</Project>
12 changes: 9 additions & 3 deletions Source/GitReleaseManager.Cli/Options/BaseGitHubSubOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ namespace GitReleaseManager.Cli.Options

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

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

[Option("token", HelpText = "The Access Token to access GitHub with.", Required = true, SetName = "OAuth flow")]
public string Token { get; set; }

[Option('o', "owner", HelpText = "The owner of the repository.", Required = true)]
public string RepositoryOwner { get; set; }

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

public GitHubClient CreateGitHubClient()
{
var credentials = new Credentials(this.UserName, this.Password);
var credentials = string.IsNullOrWhiteSpace(Token)
? new Credentials(UserName, Password)
: new Credentials(Token);

var github = new GitHubClient(new ProductHeaderValue("GitReleaseManager")) { Credentials = credentials };
return github;
}
Expand Down
15 changes: 15 additions & 0 deletions Source/GitReleaseManager.Cli/Options/LabelSubOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//-----------------------------------------------------------------------
// <copyright file="LabelSubOptions.cs" company="GitTools Contributors">
// Copyright (c) 2015 - Present - GitTools Contributors
// </copyright>
//-----------------------------------------------------------------------

namespace GitReleaseManager.Cli.Options
{
using CommandLine;

[Verb("label", HelpText = "Deletes existing labels and replaces with set of default labels.")]
public class LabelSubOptions : BaseGitHubSubOptions
{
}
}
2 changes: 2 additions & 0 deletions Source/GitReleaseManager.Cli/Options/MainOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public class MainOptions

public ShowConfigSubOptions ShowConfigVerb { get; set; }

public LabelSubOptions LabelVerb { get; set; }

////[HelpVerbOption]
////public string DoHelpForVerb(string verbName)
////{
Expand Down
Loading

0 comments on commit 4fe6268

Please sign in to comment.