Skip to content

Commit 182e72f

Browse files
committedMar 13, 2020
Add Linux as CI in appveyor (#598)
1 parent b420f04 commit 182e72f

File tree

5 files changed

+61
-33
lines changed

5 files changed

+61
-33
lines changed
 

‎CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ All notable changes to this project will be documented in this file.
33

44
CommandLineParser project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6-
## [2.8.0-preview1] - 2020-3-12
6+
## [2.8.0-preview1] - 2020-3-14
77

88
### Added
99
- Added support for async programming for `WithParsed and WithNotParsed` by [@joseangelmt, PR# 390 ](https://github.com/commandlineparser/commandline/pull/390).
1010
- Add default verb support by [@Artentus, PR# 556](https://github.com/commandlineparser/commandline/pull/556).
1111
- Add more details for localized attribute properties by [@EdmondShtogu, PR# 558](https://github.com/commandlineparser/commandline/pull/558)
1212
- Support Default in Group Options and raise error if both SetName and Group are applied on option by [@hadzhiyski, PR# 575](https://github.com/commandlineparser/commandline/pull/575).
1313
- Support mutable types without empty constructor that only does explicit implementation of interfaces by [@pergardebrink](https://github.com/commandlineparser/commandline/pull/590).
14+
-
1415

1516
### Changed
1617
- Tests cleanup by [@gsscoder, PR# 560](https://github.com/commandlineparser/commandline/pull/560).

‎README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@ __This library provides _hassle free_ command line parsing with a constantly upd
3030
- Verbs can be array of types collected from Plugins or IoC container.
3131
- Define [verb commands](https://github.com/commandlineparser/commandline/wiki/Verbs) similar to `git commit -a`.
3232
- Support default verb.
33-
- Support Mutable and Imutable types.
33+
- Support Mutable and Immutable types.
3434
- Support HelpText localization.
3535
- Support ordering of options in HelpText.
3636
- Support [Mutually Exclusive Options](https://github.com/commandlineparser/commandline/wiki/Mutually-Exclusive-Options) and Options groups.
3737
- Support named and value options.
3838
- Support Asynchronous programming with async and await.
3939
- Unparsing support: `CommandLine.Parser.Default.FormatCommandLine<T>(T options)`.
4040
- 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._
41-
- Include good wiki documentation with lot of examples ready to run online.
42-
- Support Sourcelink and symbolic package.
41+
- Include wiki documentation with lot of examples ready to run online.
42+
- Support Source Link and symbolic nuget package snupkg.
43+
- Tested in Windows, Linux Ubuntu 18.04 and Mac OS.
4344
- Most of features applies with a [CoC](http://en.wikipedia.org/wiki/Convention_over_configuration) philosophy.
4445
- C# demo: source [here](https://github.com/commandlineparser/commandline/tree/master/demo/ReadText.Demo).
4546

‎appveyor.yml

+52-26
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#version should be only changed with RELEASE eminent, see RELEASE.md
22

33
version: 2.8.0-ci-{build}
4-
image: Visual Studio 2019
4+
image:
5+
- Visual Studio 2019
6+
- ubuntu1804
57

68
clone_depth: 1
79
pull_requests:
@@ -10,24 +12,37 @@ pull_requests:
1012
init:
1113
- ps: |
1214
git config --global core.autocrlf input
13-
15+
$env:CAN_PUBLISH = $true
1416
if ($env:APPVEYOR_REPO_TAG -eq "true") {
1517
$ver = $env:APPVEYOR_REPO_TAG_NAME
1618
if($ver.StartsWith("v") -eq $true) { $ver = $ver.Substring(1) }
17-
$env:PACKAGE_VERSION = $ver
18-
} else {
19-
$env:PACKAGE_VERSION = $env:APPVEYOR_BUILD_VERSION
19+
try
20+
{
21+
Update-AppveyorBuild -Version $ver
22+
}
23+
catch
24+
{
25+
Write-Output "Update-AppveyorBuild Fail to change version to TAG: '$env:APPVEYOR_REPO_TAG_NAME'" -ForegroundColor Red
26+
Write-Output "Exception Error: $PSItem.Exception.Message" -ForegroundColor Red
27+
$env:CAN_PUBLISH = $false
28+
}
2029
}
30+
31+
- ps: |
32+
if( $ver -match '^\d+\.\d+\.\d+$') {
33+
$env:IS_RELEASE = $true
34+
} else {
35+
$env:IS_RELEASE = $false }
36+
2137
- ps: |
22-
Write-Host "PACKAGE_VERSION:$env:PACKAGE_VERSION | APPVEYOR_BUILD_VERSION='$env:APPVEYOR_BUILD_VERSION'" -ForegroundColor Yellow
23-
Write-Host "APPVEYOR_REPO_TAG_NAME:$env:APPVEYOR_REPO_TAG_NAME'" -ForegroundColor Yellow
38+
Write-Host "APPVEYOR_BUILD_VERSION='$env:APPVEYOR_BUILD_VERSION'" -ForegroundColor Yellow
39+
Write-Host "APPVEYOR_REPO_TAG_NAME= '$env:APPVEYOR_REPO_TAG_NAME'" -ForegroundColor Yellow
2440
2541
skip_commits:
2642
files:
2743
- docs/*
2844
- art/*
29-
- '**/*.md'
30-
#- .travis.yml
45+
- '**/*.md'
3146
- .gitignore
3247
- .editorconfig
3348
message: /updated readme.*|update readme.*s|update docs.*|update version.*|update changelog.*/
@@ -38,13 +53,16 @@ environment:
3853
- BUILD_TARGET: fsharp
3954

4055
build_script:
41-
- cmd: dotnet build src/CommandLine/ -c Release --version-suffix %PACKAGE_VERSION% /p:BuildTarget=%BUILD_TARGET%
56+
- cmd: dotnet build src/CommandLine/ -c Release --version-suffix %APPVEYOR_BUILD_VERSION% /p:BuildTarget=%BUILD_TARGET%
57+
- sh: dotnet build src/CommandLine/ -c Release --version-suffix $APPVEYOR_BUILD_VERSION /p:BuildTarget=$BUILD_TARGET
4258

4359
test_script:
4460
- cmd: dotnet test tests/CommandLine.Tests/ /p:BuildTarget=%BUILD_TARGET%
61+
- sh: dotnet test tests/CommandLine.Tests/ /p:BuildTarget=$BUILD_TARGET -f netcoreapp2.0
4562

4663
after_test:
47-
- cmd: dotnet pack src/CommandLine/ -c Release --version-suffix %PACKAGE_VERSION% /p:BuildTarget=%BUILD_TARGET%
64+
- cmd: dotnet pack src/CommandLine/ -c Release --version-suffix %APPVEYOR_BUILD_VERSION% /p:BuildTarget=%BUILD_TARGET%
65+
- sh: dotnet pack src/CommandLine/ -c Release --version-suffix $APPVEYOR_BUILD_VERSION /p:BuildTarget=$BUILD_TARGET
4866

4967
artifacts:
5068
- path: 'src/CommandLine/bin/Release/*.nupkg'
@@ -56,20 +74,28 @@ on_failure:
5674
tree /f /a >files.lst
5775
appveyor PushArtifact .\files.lst -DeploymentName "Failed Build File Listing"
5876
59-
deploy:
60-
- provider: GitHub
61-
auth_token:
62-
secure: hVyVwHl0JiVq0VxXB4VMRWbUtrGclIzadfnWFcWCQBLvbgMLahLBnWlwGglT63pZ
63-
artifact: 'NuGetPackages'
64-
prerelease: false
65-
force_update: true #fsharp package runs as separate build job, so have to force_update to add fsharp.nuget added
66-
on:
67-
APPVEYOR_REPO_TAG: true
77+
for:
78+
-
79+
matrix:
80+
only:
81+
- image: Visual Studio 2019
82+
deploy:
83+
- provider: GitHub
84+
auth_token:
85+
secure: hVyVwHl0JiVq0VxXB4VMRWbUtrGclIzadfnWFcWCQBLvbgMLahLBnWlwGglT63pZ
86+
artifact: /.*(\.|\.s)nupkg/
87+
prerelease: false
88+
force_update: true #fsharp package runs as separate build job, so have to force_update to add fsharp.nuget added
89+
on:
90+
APPVEYOR_REPO_TAG: true
91+
CAN_PUBLISH: true
6892

69-
- provider: NuGet
70-
api_key:
71-
secure: Ab4T/48EyIJhVrqkfKdUxmHUtseEVuXuyrGACxZ0KN35rb/BzABlBM2YjZojicvT
72-
artifact: 'NuGetPackages'
73-
on:
74-
APPVEYOR_REPO_TAG: true
93+
- provider: NuGet
94+
api_key:
95+
secure: Ab4T/48EyIJhVrqkfKdUxmHUtseEVuXuyrGACxZ0KN35rb/BzABlBM2YjZojicvT
96+
artifact: 'NuGetPackages'
97+
on:
98+
APPVEYOR_REPO_TAG: true
99+
CAN_PUBLISH: true
100+
IS_RELEASE : true
75101

‎tests/CommandLine.Tests/Fakes/HelpTextWithLineBreaks_Options.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ It has multiple lines.
1010

1111

1212
[Option(HelpText = @"This is a help text description where we want
13-
The left pad after a linebreak to be honoured so that
13+
the left pad after a linebreak to be honoured so that
1414
we can sub-indent within a description.")]
1515
public string StringValu2 { get; set; }
1616

‎tests/CommandLine.Tests/Unit/UnParserExtensionsTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ public static void UnParsing_instance_with_int_nullable(bool skipDefault, int? v
207207

208208
}
209209
[Theory]
210-
[InlineData(Shapes.Circle, "--shape circle")]
211-
[InlineData(Shapes.Square, "--shape square")]
210+
[InlineData(Shapes.Circle, "--shape Circle")]
211+
[InlineData(Shapes.Square, "--shape Square")]
212212
[InlineData(null, "")]
213213
public static void UnParsing_instance_with_nullable_enum(Shapes? shape, string expected)
214214
{

0 commit comments

Comments
 (0)
Please sign in to comment.