Skip to content

Commit be91e7f

Browse files
moh-hassanrmunn
authored andcommitted
Add Linux as CI in appveyor (commandlineparser#598)
1 parent 78171b0 commit be91e7f

File tree

2 files changed

+30
-12
lines changed

2 files changed

+30
-12
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
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).

appveyor.yml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,31 @@ pull_requests:
1212
init:
1313
- ps: |
1414
git config --global core.autocrlf input
15-
15+
$env:CAN_PUBLISH = $true
1616
if ($env:APPVEYOR_REPO_TAG -eq "true") {
1717
$ver = $env:APPVEYOR_REPO_TAG_NAME
1818
if($ver.StartsWith("v") -eq $true) { $ver = $ver.Substring(1) }
19-
$env:PACKAGE_VERSION = $ver
20-
} else {
21-
$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+
}
2229
}
30+
31+
- ps: |
32+
if( $ver -match '^\d+\.\d+\.\d+$') {
33+
$env:IS_RELEASE = $true
34+
} else {
35+
$env:IS_RELEASE = $false }
36+
2337
- ps: |
24-
Write-Host "PACKAGE_VERSION:$env:PACKAGE_VERSION | APPVEYOR_BUILD_VERSION='$env:APPVEYOR_BUILD_VERSION'" -ForegroundColor Yellow
25-
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
2640
2741
skip_commits:
2842
files:
@@ -39,16 +53,16 @@ environment:
3953
- BUILD_TARGET: fsharp
4054

4155
build_script:
42-
- cmd: dotnet build src/CommandLine/ -c Release --version-suffix %PACKAGE_VERSION% /p:BuildTarget=%BUILD_TARGET%
43-
- sh: 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
4458

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

4963
after_test:
50-
- cmd: dotnet pack src/CommandLine/ -c Release --version-suffix %PACKAGE_VERSION% /p:BuildTarget=%BUILD_TARGET%
51-
- sh: 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
5266

5367
artifacts:
5468
- path: 'src/CommandLine/bin/Release/*.nupkg'
@@ -69,16 +83,19 @@ for:
6983
- provider: GitHub
7084
auth_token:
7185
secure: hVyVwHl0JiVq0VxXB4VMRWbUtrGclIzadfnWFcWCQBLvbgMLahLBnWlwGglT63pZ
72-
artifact: 'NuGetPackages'
86+
artifact: /.*(\.|\.s)nupkg/
7387
prerelease: false
7488
force_update: true #fsharp package runs as separate build job, so have to force_update to add fsharp.nuget added
7589
on:
7690
APPVEYOR_REPO_TAG: true
91+
CAN_PUBLISH: true
7792

7893
- provider: NuGet
7994
api_key:
8095
secure: Ab4T/48EyIJhVrqkfKdUxmHUtseEVuXuyrGACxZ0KN35rb/BzABlBM2YjZojicvT
8196
artifact: 'NuGetPackages'
8297
on:
8398
APPVEYOR_REPO_TAG: true
99+
CAN_PUBLISH: true
100+
IS_RELEASE : true
84101

0 commit comments

Comments
 (0)