Skip to content

Commit 4224d6c

Browse files
authored
Merge pull request #28 from PCLExt/devel
Enhanced AppVeyor
2 parents ee6ce06 + 9538d6e commit 4224d6c

10 files changed

+306
-78
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
**Mono & .NET Core:** | **.NET 4.5 & .NET Core:** | **NuGet** | **Coveralls** | **Codecov**
2-
------------ | ------------- | ------------- | ------------- | -------------
3-
| [![Build Status](https://travis-ci.org/PCLExt/PCLExt.FileStorage.svg?branch=master)](https://travis-ci.org/PCLExt/PCLExt.FileStorage) | [![Build status](https://ci.appveyor.com/api/projects/status/puku2ym0k1n7ryde?svg=true)](https://ci.appveyor.com/project/Aragas/pclext-filestorage) [![AppVeyor tests](https://img.shields.io/appveyor/tests/Aragas/pclext-filestorage.svg)]() | [![NuGet](https://img.shields.io/nuget/v/PCLExt.FileStorage.svg)](https://www.nuget.org/packages/PCLExt.FileStorage/) | [![Coverage Status](https://coveralls.io/repos/github/PCLExt/PCLExt.FileStorage/badge.svg?branch=master)](https://coveralls.io/github/PCLExt/PCLExt.FileStorage?branch=master) | [![codecov](https://codecov.io/gh/PCLExt/PCLExt.FileStorage/branch/master/graph/badge.svg)](https://codecov.io/gh/PCLExt/PCLExt.FileStorage)
1+
**Mono & .NET Core:** | **.NET 4.5 & .NET Core:** | **NuGet** |**NuGet devel** | **Coveralls** | **Codecov**
2+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
3+
| [![Build Status](https://travis-ci.org/PCLExt/PCLExt.FileStorage.svg?branch=master)](https://travis-ci.org/PCLExt/PCLExt.FileStorage) | [![Build status](https://ci.appveyor.com/api/projects/status/puku2ym0k1n7ryde?svg=true)](https://ci.appveyor.com/project/Aragas/pclext-filestorage) [![AppVeyor tests](https://img.shields.io/appveyor/tests/Aragas/pclext-filestorage.svg)]() | [![NuGet](https://img.shields.io/nuget/v/PCLExt.FileStorage.svg)](https://www.nuget.org/packages/PCLExt.FileStorage/) | [![NuGet devel](https://img.shields.io/nuget/v/PCLExt.FileStorage-devel.svg)](https://www.nuget.org/packages/PCLExt.FileStorage-devel/) | [![Coverage Status](https://coveralls.io/repos/github/PCLExt/PCLExt.FileStorage/badge.svg?branch=master)](https://coveralls.io/github/PCLExt/PCLExt.FileStorage?branch=master) | [![codecov](https://codecov.io/gh/PCLExt/PCLExt.FileStorage/branch/master/graph/badge.svg)](https://codecov.io/gh/PCLExt/PCLExt.FileStorage)
44

55
# PCLExt.FileStorage
66

after_build_docfx.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -and $env:CONFIGURATION -eq "Release") # is not a pull request
2+
{
3+
CD docs
4+
& docfx docfx.json
5+
if ($lastexitcode -ne 0){
6+
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
7+
}
8+
9+
git config --global credential.helper store
10+
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):[email protected]`n"
11+
git config --global user.email $env:op_build_user_email
12+
git config --global user.name $env:op_build_user
13+
git clone https://github.com/$($env:APPVEYOR_REPO_NAME).git -b gh-pages origin_site -q
14+
Copy-Item origin_site/.git _site -recurse
15+
CD _site
16+
git add -A 2>&1
17+
git commit -m "CI Updates" -q
18+
git push origin gh-pages -q
19+
}

after_test_fx_core.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# PCLExt.FileStorage.Core.Test
2+
choco install codecov
3+
dotnet tool install -g coveralls.net
4+
CD $env:APPVEYOR_BUILD_FOLDER
5+
CD test\PCLExt.FileStorage.Core.Test
6+
dotnet add package coverlet.msbuild
7+
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[NUnit*]*
8+
csmacnz.coveralls --opencover -i coverage.opencover.xml --repoToken $env:COVERALLS_REPO_TOKEN
9+
codecov -f coverage.opencover.xml
10+
11+
# PCLExt.FileStorage.NetFX.Test
12+
CD $env:APPVEYOR_BUILD_FOLDER
13+
nuget install OpenCover -Version 4.6.519 -OutputDirectory tools
14+
nuget install NUnit.ConsoleRunner -Version 3.8.0 -OutputDirectory tools
15+
.\tools\OpenCover.4.6.519\tools\OpenCover.Console.exe -filter:"+[PCLExt.*]* -[PCLExt.FileStorage.NetFX.Test]*" -register:user -target:".\tools\NUnit.ConsoleRunner.3.8.0\tools\nunit3-console.exe" -targetargs:"/domain:single test/PCLExt.FileStorage.NetFX.Test/bin/Debug/PCLExt.FileStorage.NetFX.Test.dll" -output:coverage_netfx.xml
16+
csmacnz.coveralls --opencover -i coverage_netfx.xml --repoToken $env:COVERALLS_REPO_TOKEN
17+
codecov -f coverage_netfx.xml

after_test_nuget-devel.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
if($env:CONFIGURATION -eq "Release") # is not a pull request
2+
{
3+
cd $env:APPVEYOR_BUILD_FOLDER
4+
cd common
5+
nuget pack PCLExt.FileStorage-devel.nuspec -Version $env:APPVEYOR_BUILD_VERSION
6+
$nupkg = (Get-ChildItem PCLExt.FileStorage-devel*.nupkg)[0];
7+
Push-AppveyorArtifact $nupkg.FullName -FileName $nupkg.Name -DeploymentName "PCLExt.FileStorage-devel.nupkg";
8+
}

after_test_nuget.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
if($env:CONFIGURATION -eq "Release" -and $env:APPVEYOR_REPO_TAG -eq "true")
2+
{
3+
cd $env:APPVEYOR_BUILD_FOLDER
4+
cd common
5+
nuget pack PCLExt.FileStorage.nuspec -Version $env:APPVEYOR_BUILD_VERSION
6+
$nupkg = (Get-ChildItem PCLExt.FileStorage*.nupkg)[0];
7+
Push-AppveyorArtifact $nupkg.FullName -FileName $nupkg.Name -DeploymentName "PCLExt.FileStorage.nupkg";
8+
}

appveyor.yml

Lines changed: 178 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,186 @@
1-
os: Visual Studio 2017
1+
########################################################
2+
## MASTER ##
3+
########################################################
4+
-
5+
branches:
6+
only:
7+
- master
28

3-
configuration:
4-
- Debug
5-
- Release
6-
platform: Any CPU
7-
8-
environment:
9-
COVERALLS_REPO_TOKEN:
9+
os: Visual Studio 2017
10+
configuration:
11+
- Debug
12+
- Release
13+
platform: Any CPU
14+
version: 1.4.1.{build}
15+
16+
skip_commits:
17+
files:
18+
- docs/*
19+
- LICENSE
20+
- README.md
21+
- .travis.yml
22+
- .gitignore
23+
24+
cache:
25+
- packages -> **\packages.config
26+
- C:\ProgramData\chocolatey\bin -> appveyor.yml
27+
- C:\ProgramData\chocolatey\lib -> appveyor.yml
28+
29+
environment:
30+
COVERALLS_REPO_TOKEN:
1031
secure: q5xCVqG+/0ByXEFTGYgf1lCWwrOqq35br6CzLf5MPKMD2L8VboA10tKcRfW2n/70
11-
op_build_user: "OpenPublishBuild"
12-
op_build_user_email: "[email protected]"
13-
access_token:
14-
secure: GQ3IuQcROfrBh1zCm97nDduFgUcaK9uD4xbawJx5iKcx5IvP7dEahe16nmwF+fQE
15-
16-
cache:
17-
- packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
18-
- C:\ProgramData\chocolatey\bin -> appveyor.yml
19-
- C:\ProgramData\chocolatey\lib -> appveyor.yml
32+
op_build_user: "OpenPublishBuild"
33+
op_build_user_email: "[email protected]"
34+
access_token:
35+
secure: GQ3IuQcROfrBh1zCm97nDduFgUcaK9uD4xbawJx5iKcx5IvP7dEahe16nmwF+fQE
2036

21-
install:
22-
- git submodule update --init --recursive
23-
24-
before_build:
25-
- nuget restore
26-
- ps: |
27-
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
37+
assembly_info:
38+
patch: true
39+
file: common\CommonAssemblyInfo.cs
40+
assembly_version: "{version}"
41+
assembly_file_version: "{version}"
42+
assembly_informational_version: "{version}"
43+
44+
init:
45+
- cd %APPVEYOR_BUILD_FOLDER%
46+
- ps: |
47+
if ($env:APPVEYOR_REPO_TAG -eq "true")
2848
{
29-
git checkout $env:APPVEYOR_REPO_BRANCH -q
30-
choco install docfx -y
31-
# choco install nuget.commandline -y
49+
Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_TAG_NAME)"
3250
}
51+
52+
install:
53+
- git submodule update --init --recursive
54+
55+
before_build:
56+
- nuget restore
57+
- cd %APPVEYOR_BUILD_FOLDER%
58+
- ps: ./before_build_docfx.ps1
59+
60+
build:
61+
project: PCLExt.FileStorage.sln
62+
verbosity: minimal
63+
64+
after_build:
65+
- cd %APPVEYOR_BUILD_FOLDER%
66+
- ps: ./after_build_docfx.ps1
67+
68+
after_test:
69+
- cd %APPVEYOR_BUILD_FOLDER%
70+
- ps: ./after_test_fx_core.ps1
71+
- cd %APPVEYOR_BUILD_FOLDER%
72+
- ps: ./after_test_nuget.ps1
73+
74+
75+
deploy:
76+
provider: NuGet
77+
api_key:
78+
secure: yoZtG3i28wVuNDk1HrGW/t3tsgt3Ru/Yk/y/sOzUHRc2WVZlynVdWSHK/Bp0uShJ
79+
skip_symbols: false
80+
artifact: PCLExt.FileStorage.nupkg
81+
on:
82+
configuration: Release
83+
APPVEYOR_REPO_TAG: true
84+
3385

34-
build:
35-
project: PCLExt.FileStorage.sln
36-
verbosity: minimal
86+
########################################################
87+
## DEVELOPMENT ##
88+
########################################################
89+
-
90+
branches:
91+
only:
92+
- devel
93+
94+
os: Visual Studio 2017
95+
configuration:
96+
- Debug
97+
- Release
98+
platform: Any CPU
99+
version: 1.4.1.{build}
37100

38-
after_build:
39-
- ps: |
40-
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
41-
{
42-
CD docs
43-
& docfx docfx.json
44-
if ($lastexitcode -ne 0){
45-
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
46-
}
47-
48-
git config --global credential.helper store
49-
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):[email protected]`n"
50-
git config --global user.email $env:op_build_user_email
51-
git config --global user.name $env:op_build_user
52-
git clone https://github.com/PCLExt/PCLExt.FileStorage.git -b gh-pages origin_site -q
53-
Copy-Item origin_site/.git _site -recurse
54-
CD _site
55-
git add -A 2>&1
56-
git commit -m "CI Updates" -q
57-
git push origin gh-pages -q
58-
}
101+
skip_commits:
102+
files:
103+
- docs/*
104+
- LICENSE
105+
- README.md
106+
- .travis.yml
107+
- .gitignore
108+
109+
cache:
110+
- packages -> **\packages.config
111+
- C:\ProgramData\chocolatey\bin -> appveyor.yml
112+
- C:\ProgramData\chocolatey\lib -> appveyor.yml
113+
114+
environment:
115+
COVERALLS_REPO_TOKEN:
116+
secure: q5xCVqG+/0ByXEFTGYgf1lCWwrOqq35br6CzLf5MPKMD2L8VboA10tKcRfW2n/70
117+
118+
assembly_info:
119+
patch: true
120+
file: common\CommonAssemblyInfo.cs
121+
assembly_version: "{version}"
122+
assembly_file_version: "{version}"
123+
assembly_informational_version: "{version}-devel"
124+
125+
install:
126+
- git submodule update --init --recursive
127+
128+
before_build:
129+
- nuget restore
130+
131+
build:
132+
project: PCLExt.FileStorage.sln
133+
verbosity: minimal
134+
135+
after_test:
136+
- cd %APPVEYOR_BUILD_FOLDER%
137+
- ps: ./after_test_fx_core.ps1
138+
- cd %APPVEYOR_BUILD_FOLDER%
139+
- ps: ./after_test_nuget-devel.ps1
140+
141+
deploy:
142+
provider: NuGet
143+
api_key:
144+
secure: yoZtG3i28wVuNDk1HrGW/t3tsgt3Ru/Yk/y/sOzUHRc2WVZlynVdWSHK/Bp0uShJ
145+
skip_symbols: false
146+
artifact: PCLExt.FileStorage-devel.nupkg
147+
on:
148+
configuration: Release
59149

60-
after_test:
61-
- choco install codecov
62-
- dotnet tool install -g coveralls.net
63-
#netcore
64-
- cd %APPVEYOR_BUILD_FOLDER%
65-
- cd test\PCLExt.FileStorage.Core.Test
66-
- dotnet add package coverlet.msbuild
67-
- dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[NUnit*]*
68-
- csmacnz.coveralls --opencover -i coverage.opencover.xml --repoToken %COVERALLS_REPO_TOKEN%
69-
- codecov -f "coverage.opencover.xml"
70-
#netfx
71-
- cd %APPVEYOR_BUILD_FOLDER%
72-
- nuget install OpenCover -Version 4.6.519 -OutputDirectory tools
73-
- nuget install NUnit.ConsoleRunner -Version 3.8.0 -OutputDirectory tools
74-
- .\tools\OpenCover.4.6.519\tools\OpenCover.Console.exe -filter:"+[PCLExt.*]* -[PCLExt.FileStorage.NetFX.Test]*" -register:user -target:".\tools\NUnit.ConsoleRunner.3.8.0\tools\nunit3-console.exe" -targetargs:"/domain:single test/PCLExt.FileStorage.NetFX.Test/bin/Debug/PCLExt.FileStorage.NetFX.Test.dll" -output:coverage_netfx.xml
75-
- csmacnz.coveralls --opencover -i coverage_netfx.xml --repoToken %COVERALLS_REPO_TOKEN%
76-
- codecov -f coverage_netfx.xml
150+
151+
########################################################
152+
## ANY OTHER BRANCH ##
153+
########################################################
154+
-
155+
os: Visual Studio 2017
156+
configuration:
157+
- Release
158+
- Debug
159+
platform: Any CPU
160+
161+
skip_commits:
162+
files:
163+
- docs/*
164+
- LICENSE
165+
- README.md
166+
- .travis.yml
167+
- .gitignore
168+
169+
cache:
170+
- packages -> **\packages.config
171+
- C:\ProgramData\chocolatey\bin -> appveyor.yml
172+
- C:\ProgramData\chocolatey\lib -> appveyor.yml
173+
174+
install:
175+
- git submodule update --init --recursive
176+
177+
before_build:
178+
- nuget restore
179+
180+
build:
181+
project: PCLExt.FileStorage.sln
182+
verbosity: minimal
183+
184+
after_test:
185+
- cd %APPVEYOR_BUILD_FOLDER%
186+
- ps: ./after_test_fx_core.ps1

before_build_docfx.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -and $env:CONFIGURATION -eq "Release") # is not a pull request
2+
{
3+
git checkout $env:APPVEYOR_REPO_BRANCH -q
4+
choco install docfx -y
5+
}

common/CommonAssemblyInfo.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
[assembly: AssemblyTrademark("")]
88
[assembly: AssemblyCulture("")]
99

10-
[assembly: AssemblyVersion("1.4.1.0")]
11-
[assembly: AssemblyFileVersion("1.4.1.0")]
10+
[assembly: AssemblyVersion("1.4.1.1")]
11+
[assembly: AssemblyFileVersion("1.4.1.1")]
12+
[assembly: AssemblyInformationalVersion("1.4.1.1")]

0 commit comments

Comments
 (0)