Skip to content

Commit 5a4b077

Browse files
committed
Merging latest changes from main project (upstream) and resolving conflicts.
2 parents 7d29a60 + 4bd363a commit 5a4b077

File tree

85 files changed

+2662
-2753
lines changed

Some content is hidden

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

85 files changed

+2662
-2753
lines changed

.editorconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#top-most EditorConfig for project
2+
root = true
3+
4+
[*]
5+
end_of_line = crlf
6+
insert_final_newline = true
7+
8+
[*.cs]
9+
indent_style = space
10+
indent_size = 4
11+
12+
[*.{xml,csproj,config}]
13+
indent_style = tab
14+
indent_size = 4
15+
16+
[*.json]
17+
indent_style = space
18+
indent_size = 2
19+
20+
[*.js]
21+
indent_style = space
22+
indent_size = 2
23+
24+
[*.yml]
25+
indent_style = space
26+
indent_size = 2

.paket/Paket.Restore.targets

Lines changed: 0 additions & 272 deletions
This file was deleted.

.paket/paket.bootstrapper.exe

-62.8 KB
Binary file not shown.

CommandLine.nuspec

Lines changed: 0 additions & 44 deletions
This file was deleted.

CommandLine.sln

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27703.2042
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandLine", "src\CommandLine\CommandLine.csproj", "{E1BD3C65-49C3-49E7-BABA-C60980CB3F20}"
77
EndProject
8-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Welcome", ".Welcome", "{D9C1F005-94A7-4A2A-81F3-9C053D5A6AEC}"
9-
ProjectSection(SolutionItems) = preProject
10-
License.md = License.md
11-
README.md = README.md
12-
EndProjectSection
13-
EndProject
14-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FSharp", "FSharp", "{751E6303-1623-4418-B298-4FF97DA5C86E}"
15-
ProjectSection(SolutionItems) = preProject
16-
demo\fsharp-demo.fsx = demo\fsharp-demo.fsx
17-
EndProjectSection
18-
EndProject
19-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A6C99AE7-2FE1-4393-9281-7BFCF46A6F53}"
20-
ProjectSection(SolutionItems) = preProject
21-
build.fsx = build.fsx
22-
EndProjectSection
23-
EndProject
248
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandLine.Tests", "tests\CommandLine.Tests\CommandLine.Tests.csproj", "{0A15C4D2-B3E9-43AB-8155-1B39F7AC8A5E}"
259
EndProject
2610
Global
@@ -41,6 +25,9 @@ Global
4125
GlobalSection(SolutionProperties) = preSolution
4226
HideSolutionNode = FALSE
4327
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {5B5A476C-82FB-49FB-B592-5224D9005186}
30+
EndGlobalSection
4431
GlobalSection(MonoDevelopProperties) = preSolution
4532
StartupItem = src\CommandLine\CommandLine.csproj
4633
EndGlobalSection

CommandLine.sln.DotSettings

Lines changed: 0 additions & 4 deletions
This file was deleted.

Commandline.FSharp.nuspec

Lines changed: 0 additions & 50 deletions
This file was deleted.

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
[![Build status](https://img.shields.io/appveyor/ci/commandlineparser/commandline.svg)](https://ci.appveyor.com/project/commandlineparser/commandline)
2-
[![Nuget](https://img.shields.io/nuget/dt/commandlineparser.svg)](http://nuget.org/packages/commandlineparser)
3-
[![Nuget](https://img.shields.io/nuget/v/commandlineparser.svg)](http://nuget.org/packages/commandlineparser)
4-
[![Nuget](https://img.shields.io/nuget/vpre/commandlineparser.svg)](http://nuget.org/packages/commandlineparser)
5-
[![Join the gitter chat!](https://badges.gitter.im/gsscoder/commandline.svg)](https://gitter.im/gsscoder/commandline?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1+
[![Build status](https://ci.appveyor.com/api/projects/status/p61dj8udxs2aocmo/branch/master?svg=true)](https://ci.appveyor.com/project/commandlineparser/commandline/branch/master)
2+
[![NuGet](https://img.shields.io/nuget/dt/commandlineparser.svg)](http://nuget.org/packages/commandlineparser)
3+
[![NuGet](https://img.shields.io/nuget/v/commandlineparser.svg)](http://nuget.org/packages/commandlineparser)
4+
[![NuGet](https://img.shields.io/nuget/vpre/commandlineparser.svg)](http://nuget.org/packages/commandlineparser)
5+
[![Join the Gitter chat!](https://badges.gitter.im/gsscoder/commandline.svg)](https://gitter.im/gsscoder/commandline?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
66

77
# Command Line Parser Library for CLR and NetStandard
88

@@ -11,7 +11,7 @@
1111
The Command Line Parser Library offers CLR applications a clean and concise API for manipulating command line arguments and related tasks, such as defining switches, options and verb commands. It allows you to display a help screen with a high degree of customization and a simple way to report syntax errors to the end user.
1212

1313
```
14-
C:\Project> Nuget Install CommandLineParser
14+
C:\Project> NuGet Install CommandLineParser
1515
```
1616

1717
_NOTE: Mentioned F# Support is provided via ```CommandLineParser.FSharp``` package with FSharp dependencies._
@@ -20,7 +20,7 @@ __This library provides _hassle free_ command line parsing with a constantly upd
2020

2121
# At a glance:
2222

23-
- Compatible with __.NET Framework 4.0+__, __Mono 2.1+ Profile__, and __.Net Core__
23+
- Compatible with __.NET Framework 4.0+__, __Mono 2.1+ Profile__, and __.NET Core__
2424
- Doesn't depend on other packages (No dependencies beyond standard base libraries)
2525
- One line parsing using default singleton: `CommandLine.Parser.Default.ParseArguments(...)`.
2626
- Automatic or one line help screen generator: `HelpText.AutoBuild(...)`.
@@ -29,15 +29,15 @@ __This library provides _hassle free_ command line parsing with a constantly upd
2929
- You can also map to every type with a constructor that accepts a string (like `System.Uri`).
3030
- Define [verb commands](https://github.com/commandlineparser/commandline/wiki#verbs) similar to `git commit -a`.
3131
- Unparsing support: `CommandLine.Parser.Default.FormatCommandLine<T>(T options)`.
32-
- CommandLineParser.FSharp package is F#-friendly with support for `option<'a>`, see [demo](https://github.com/commandlineparser/commandline/blob/master/demo/fsharp-demo.fsx). _NOTE: This is a separate Nuget package._
32+
- CommandLineParser.FSharp package is F#-friendly with support for `option<'a>`, see [demo](https://github.com/commandlineparser/commandline/blob/master/demo/fsharp-demo.fsx). _NOTE: This is a separate NuGet package._
3333
- Most of features applies with a [CoC](http://en.wikipedia.org/wiki/Convention_over_configuration) philosophy.
3434
- C# demo: source [here](https://github.com/commandlineparser/commandline/tree/master/demo/ReadText.Demo).
3535

3636
# Getting Started with the Command Line Parser Library
3737

3838
You can utilize the parser library in several ways:
3939

40-
- Install via Nuget/Paket
40+
- Install via NuGet/Paket: [https://www.nuget.org/packages/CommandLineParser/](https://www.nuget.org/packages/CommandLineParser/)
4141
- Integrate directly into your project by copying the .cs files into your project.
4242
- ILMerge during your build process.
4343

@@ -98,7 +98,7 @@ class Options
9898
public bool Verbose { get; set; }
9999

100100
[Option("stdin",
101-
Default = false
101+
Default = false,
102102
HelpText = "Read from stdin")]
103103
public bool stdin { get; set; }
104104

@@ -131,7 +131,7 @@ let main argv =
131131
| :? NotParsed<options> as notParsed -> fail notParsed.Errors
132132
```
133133

134-
VB.Net:
134+
VB.NET:
135135

136136
```VB.NET
137137
Class Options
@@ -175,11 +175,11 @@ class AddOptions {
175175
}
176176
[Verb("commit", HelpText = "Record changes to the repository.")]
177177
class CommitOptions {
178-
//normal options here
178+
//commit options here
179179
}
180180
[Verb("clone", HelpText = "Clone a repository into a new directory.")]
181181
class CloneOptions {
182-
//normal options here
182+
//clone options here
183183
}
184184

185185
int Main(string[] args) {
@@ -192,7 +192,7 @@ int Main(string[] args) {
192192
}
193193
```
194194

195-
VB.Net example:
195+
VB.NET example:
196196

197197
```VB.NET
198198
<CommandLine.Verb("add", HelpText:="Add file contents to the index.")>
@@ -249,7 +249,7 @@ let main args =
249249
| :? CommandLine.NotParsed<obj> -> 1
250250
```
251251

252-
# Contibutors
252+
# Contributors
253253
First off, _Thank you!_ All contributions are welcome.
254254

255255
Please consider sticking with the GNU getopt standard for command line parsing.

appveyor.yml

Lines changed: 19 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
#version should be changed with any pull requests
2-
version: 2.2.{build}
1+
#version should be only changed with RELEASE eminent, see RELEASE.md
2+
version: 2.4.{build}
33

44
clone_depth: 1
55
pull_requests:
66
do_not_increment_build_number: true
77

8-
#cache:
9-
#- packages -> paket.dependencies
10-
#- paket-files > paket.dependencies
11-
128
init:
139
- ps: |
1410
git config --global core.autocrlf input
@@ -18,62 +14,43 @@ init:
1814
if($ver.StartsWith("v") -eq $true) { $ver = $ver.Substring(1) }
1915
Update-AppveyorBuild -Version $ver
2016
}
21-
elseif([System.String]::IsNullOrEmpty($env:APPVEYOR_PULL_REQUEST_NUMBER) -eq $true) {
22-
$ver = $env:APPVEYOR_BUILD_VERSION
23-
$commit = $env:APPVEYOR_REPO_COMMIT.substring(0,7)
24-
Update-AppveyorBuild -Version "$ver-$commit"
25-
}
26-
27-
#version patching
28-
assembly_info:
29-
file: src\SharedAssemblyInfo.cs
30-
patch: true
31-
assembly_version: '{version}'
32-
assembly_file_version: '{version}'
33-
assembly_informational_version: $(APPVEYOR_BUILD_VERSION)
34-
dotnet_csproj:
35-
patch: true
36-
file: '**\*.csproj'
37-
version: '{version}'
38-
package_version: '{version}'
39-
assembly_version: '{version}'
40-
file_version: '{version}'
41-
informational_version: '{version}'
42-
4317
4418
environment:
4519
matrix:
4620
- BUILD_TARGET: base
47-
NUSPEC_FILE: CommandLine
4821
- BUILD_TARGET: fsharp
49-
NUSPEC_FILE: CommandLine.FSharp
5022

5123
build_script:
52-
- cmd: build.cmd %BUILD_TARGET%
24+
- cmd: dotnet build src/CommandLine/ -c Release --version-suffix %APPVEYOR_BUILD_VERSION% /p:BuildTarget=%BUILD_TARGET%
5325

54-
after_build:
55-
- ps: |
56-
powershell get-childitem Release\* -include *.dll | foreach-object { "{0}`t{1}" -f $_.Path, [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileVersion }
57-
58-
.\build-nuget-pack.cmd $env:BUILD_TARGET $env:NUSPEC_FILE
26+
test_script:
27+
- cmd: dotnet test tests/CommandLine.Tests/ /p:BuildTarget=%BUILD_TARGET%
5928

60-
test: auto
29+
after_test:
30+
- cmd: dotnet pack src/CommandLine/ -c Release --version-suffix %APPVEYOR_BUILD_VERSION% /p:BuildTarget=%BUILD_TARGET%
6131

6232
artifacts:
63-
- path: 'Release/**/*.nupkg'
64-
name: NugetPackages
33+
- path: 'src/CommandLine/bin/Release/*.nupkg'
34+
name: NuGetPackages
6535

6636
on_failure:
6737
- cmd: |
6838
tree /f /a >files.lst
6939
appveyor PushArtifact .\files.lst -DeploymentName "Failed Build File Listing"
7040
7141
deploy:
42+
- provider: GitHub
43+
auth_token:
44+
secure: hVyVwHl0JiVq0VxXB4VMRWbUtrGclIzadfnWFcWCQBLvbgMLahLBnWlwGglT63pZ
45+
artifact: 'NuGetPackages'
46+
prerelease: false
47+
force_update: true #fsharp package runs as separate build job, so have to force_update to add fsharp.nuget added
48+
on:
49+
APPVEYOR_REPO_TAG: true
50+
7251
- provider: NuGet
7352
api_key:
74-
secure: +Zxb8M5W+UJV1yd9n8seu3PvH/hGNPEmgriGBnsSmtxjKPQAJ4+iL7tKAmfPHAuG
53+
secure: Ab4T/48EyIJhVrqkfKdUxmHUtseEVuXuyrGACxZ0KN35rb/BzABlBM2YjZojicvT
7554
artifact: 'NuGetPackages'
7655
on:
77-
branch: /master|v\d+\.\d+\.\d+[.*]/
7856
APPVEYOR_REPO_TAG: true
79-

build-nuget-pack.cmd

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)