Skip to content

Commit

Permalink
Add Linux as CI in appveyor (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
moh-hassan committed Mar 13, 2020
1 parent b420f04 commit 5e09c7d
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 33 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -3,14 +3,15 @@ All notable changes to this project will be documented in this file.

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

## [2.8.0-preview1] - 2020-3-12
## [2.8.0-preview1] - 2020-3-14

### Added
- Added support for async programming for `WithParsed and WithNotParsed` by [@joseangelmt, PR# 390 ](https://github.com/commandlineparser/commandline/pull/390).
- Add default verb support by [@Artentus, PR# 556](https://github.com/commandlineparser/commandline/pull/556).
- Add more details for localized attribute properties by [@EdmondShtogu, PR# 558](https://github.com/commandlineparser/commandline/pull/558)
- 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).
- Support mutable types without empty constructor that only does explicit implementation of interfaces by [@pergardebrink](https://github.com/commandlineparser/commandline/pull/590).
-

### Changed
- Tests cleanup by [@gsscoder, PR# 560](https://github.com/commandlineparser/commandline/pull/560).
Expand Down
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -30,16 +30,17 @@ __This library provides _hassle free_ command line parsing with a constantly upd
- Verbs can be array of types collected from Plugins or IoC container.
- Define [verb commands](https://github.com/commandlineparser/commandline/wiki/Verbs) similar to `git commit -a`.
- Support default verb.
- Support Mutable and Imutable types.
- Support Mutable and Immutable types.
- Support HelpText localization.
- Support ordering of options in HelpText.
- Support [Mutually Exclusive Options](https://github.com/commandlineparser/commandline/wiki/Mutually-Exclusive-Options) and Options groups.
- Support named and value options.
- Support Asynchronous programming with async and await.
- Unparsing support: `CommandLine.Parser.Default.FormatCommandLine<T>(T options)`.
- 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._
- Include good wiki documentation with lot of examples ready to run online.
- Support Sourcelink and symbolic package.
- Include wiki documentation with lot of examples ready to run online.
- Support Source Link and symbolic nuget package snupkg.
- Tested in Windows, Linux Ubuntu 18.04 and Mac OS.
- Most of features applies with a [CoC](http://en.wikipedia.org/wiki/Convention_over_configuration) philosophy.
- C# demo: source [here](https://github.com/commandlineparser/commandline/tree/master/demo/ReadText.Demo).

Expand Down
71 changes: 45 additions & 26 deletions appveyor.yml
@@ -1,7 +1,9 @@
#version should be only changed with RELEASE eminent, see RELEASE.md

version: 2.8.0-ci-{build}
image: Visual Studio 2019
image:
- Visual Studio 2019
- ubuntu1804

clone_depth: 1
pull_requests:
Expand All @@ -10,24 +12,31 @@ pull_requests:
init:
- ps: |
git config --global core.autocrlf input
$env:CAN_PUBLISH = $true
if ($env:APPVEYOR_REPO_TAG -eq "true") {
$ver = $env:APPVEYOR_REPO_TAG_NAME
if($ver.StartsWith("v") -eq $true) { $ver = $ver.Substring(1) }
$env:PACKAGE_VERSION = $ver
} else {
$env:PACKAGE_VERSION = $env:APPVEYOR_BUILD_VERSION
try
{
Update-AppveyorBuild -Version $ver
}
catch
{
Write-Output "Update-AppveyorBuild Fail to change version to TAG: '$env:APPVEYOR_REPO_TAG_NAME'" -ForegroundColor Red
Write-Output "Exception Error: $PSItem.Exception.Message" -ForegroundColor Red
$env:CAN_PUBLISH = $false
}
}
- ps: |
Write-Host "PACKAGE_VERSION:$env:PACKAGE_VERSION | APPVEYOR_BUILD_VERSION='$env:APPVEYOR_BUILD_VERSION'" -ForegroundColor Yellow
Write-Host "APPVEYOR_REPO_TAG_NAME:$env:APPVEYOR_REPO_TAG_NAME'" -ForegroundColor Yellow
Write-Host "APPVEYOR_BUILD_VERSION='$env:APPVEYOR_BUILD_VERSION'" -ForegroundColor Yellow
Write-Host "APPVEYOR_REPO_TAG_NAME= '$env:APPVEYOR_REPO_TAG_NAME'" -ForegroundColor Yellow
skip_commits:
files:
- docs/*
- art/*
- '**/*.md'
#- .travis.yml
- '**/*.md'
- .gitignore
- .editorconfig
message: /updated readme.*|update readme.*s|update docs.*|update version.*|update changelog.*/
Expand All @@ -38,13 +47,16 @@ environment:
- BUILD_TARGET: fsharp

build_script:
- cmd: dotnet build src/CommandLine/ -c Release --version-suffix %PACKAGE_VERSION% /p:BuildTarget=%BUILD_TARGET%
- cmd: dotnet build src/CommandLine/ -c Release --version-suffix %APPVEYOR_BUILD_VERSION% /p:BuildTarget=%BUILD_TARGET%
- sh: dotnet build src/CommandLine/ -c Release --version-suffix $APPVEYOR_BUILD_VERSION /p:BuildTarget=$BUILD_TARGET

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

after_test:
- cmd: dotnet pack src/CommandLine/ -c Release --version-suffix %PACKAGE_VERSION% /p:BuildTarget=%BUILD_TARGET%
- cmd: dotnet pack src/CommandLine/ -c Release --version-suffix %APPVEYOR_BUILD_VERSION% /p:BuildTarget=%BUILD_TARGET%
- sh: dotnet pack src/CommandLine/ -c Release --version-suffix $APPVEYOR_BUILD_VERSION /p:BuildTarget=$BUILD_TARGET

artifacts:
- path: 'src/CommandLine/bin/Release/*.nupkg'
Expand All @@ -56,20 +68,27 @@ on_failure:
tree /f /a >files.lst
appveyor PushArtifact .\files.lst -DeploymentName "Failed Build File Listing"
deploy:
- provider: GitHub
auth_token:
secure: hVyVwHl0JiVq0VxXB4VMRWbUtrGclIzadfnWFcWCQBLvbgMLahLBnWlwGglT63pZ
artifact: 'NuGetPackages'
prerelease: false
force_update: true #fsharp package runs as separate build job, so have to force_update to add fsharp.nuget added
on:
APPVEYOR_REPO_TAG: true
for:
-
matrix:
only:
- image: Visual Studio 2019
deploy:
- provider: GitHub
auth_token:
secure: hVyVwHl0JiVq0VxXB4VMRWbUtrGclIzadfnWFcWCQBLvbgMLahLBnWlwGglT63pZ
artifact: /.*(\.|\.s)nupkg/
prerelease: false
force_update: true #fsharp package runs as separate build job, so have to force_update to add fsharp.nuget added
on:
APPVEYOR_REPO_TAG: true
CAN_PUBLISH: true

- provider: NuGet
api_key:
secure: Ab4T/48EyIJhVrqkfKdUxmHUtseEVuXuyrGACxZ0KN35rb/BzABlBM2YjZojicvT
artifact: 'NuGetPackages'
on:
APPVEYOR_REPO_TAG: true
- provider: NuGet
api_key:
secure: Ab4T/48EyIJhVrqkfKdUxmHUtseEVuXuyrGACxZ0KN35rb/BzABlBM2YjZojicvT
artifact: 'NuGetPackages'
on:
APPVEYOR_REPO_TAG: true
CAN_PUBLISH: true

Expand Up @@ -10,7 +10,7 @@ public class HelpTextWithLineBreaks_Options


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

Expand Down
4 changes: 2 additions & 2 deletions tests/CommandLine.Tests/Unit/UnParserExtensionsTests.cs
Expand Up @@ -207,8 +207,8 @@ public static void UnParsing_instance_with_int_nullable(bool skipDefault, int? v

}
[Theory]
[InlineData(Shapes.Circle, "--shape circle")]
[InlineData(Shapes.Square, "--shape square")]
[InlineData(Shapes.Circle, "--shape Circle")]
[InlineData(Shapes.Square, "--shape Square")]
[InlineData(null, "")]
public static void UnParsing_instance_with_nullable_enum(Shapes? shape, string expected)
{
Expand Down

0 comments on commit 5e09c7d

Please sign in to comment.