Skip to content

Commit

Permalink
update build
Browse files Browse the repository at this point in the history
  • Loading branch information
phnx47 committed Sep 13, 2018
1 parent 398ece7 commit 263b7f2
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 41 deletions.
29 changes: 14 additions & 15 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
[*]
charset=utf-8
end_of_line=lf
indent_style=space
max_line_length = 160
charset = utf-8
end_of_line = lf
indent_style = space
max_line_length = 180
insert_final_newline = true

[*.{cs}]
[*.cs]
indent_size = 4
insert_final_newline = true

# Code files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_style=space
indent_size=2
[*.csproj]
indent_size = 2

# Xml config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
[{*.yml,*.yaml}]
indent_size = 2

# JSON files
[*.json]
indent_size = 2

# .NET code style settings:
[*.{cs,vb}]
# Sort using and Import directives with System.* appearing first
[{*.sh, *.ps1}]
indent_size = 2

# code style settings:
[*.{cs}]
dotnet_sort_system_directives_first = true
15 changes: 0 additions & 15 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,3 @@
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
1 change: 1 addition & 0 deletions Prometheus.Client.AspNetCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ProjectSection(SolutionItems) = preProject
LICENSE = LICENSE
README.md = README.md
.editorconfig = .editorconfig
pack.ps1 = pack.ps1
EndProjectSection
EndProject
Global
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Prometheus.Client.AspNetCore

[![NuGet Badge](https://buildstats.info/nuget/Prometheus.Client.AspNetCore)](https://www.nuget.org/packages/Prometheus.Client.AspNetCore/)
[![MyGet](https://img.shields.io/myget/phnx47-beta/vpre/Prometheus.Client.AspNetCore.svg)](https://www.myget.org/feed/phnx47-beta/package/nuget/Prometheus.Client.AspNetCore)
[![NuGet](https://img.shields.io/nuget/v/Prometheus.Client.AspNetCore.svg)](https://www.nuget.org/packages/Prometheus.Client.AspNetCore)
[![NuGet](https://img.shields.io/nuget/dt/Prometheus.Client.AspNetCore.svg)](https://www.nuget.org/packages/Prometheus.Client.AspNetCore)

[![Build status](https://ci.appveyor.com/api/projects/status/d5pdqedoxogmiun4/branch/master?svg=true)](https://ci.appveyor.com/project/PrometheusClientNet/prometheus-client-aspnetcore/branch/master)
[![License MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/73abdf76e71f42dfb6887a15eafb250a)](https://www.codacy.com/app/phnx47/Prometheus.Client.AspNetCore?utm_source=github.com&utm_medium=referral&utm_content=PrometheusClientNet/Prometheus.Client.AspNetCore&utm_campaign=Badge_Grade)
[![License MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)



Extension for [Prometheus.Client](https://github.com/PrometheusClientNet/Prometheus.Client)
Expand Down
30 changes: 26 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
version: '{build}-{branch}'
image: Visual Studio 2017

skip_commits:
files:
- '**/*.md'

build_script:
- cmd: dotnet restore src\Prometheus.Client.AspNetCore && dotnet pack src\Prometheus.Client.AspNetCore -c Release --include-symbols
- pwsh: dotnet build -c Release

after_build:
- pwsh: .\pack.ps1

artifacts:
- path: '**\*.nupkg'
name: All Nupkg
- path: '**\artifacts\nuget\*.nupkg'
name: Nuget
- path: '**\artifacts\myget\*.nupkg'
name: Myget

deploy:
- provider: NuGet
api_key:
secure: nts+1V9NzzFZbyAVeJs951l/7K01aEfLTEGGyb8t2zNMcZhBnlSTGPoQV8IRpsMa
artifact: NuGet
on:
appveyor_repo_tag: true
appveyor_repo_tag: true
- provider: NuGet
server: https://www.myget.org/F/phnx47-beta/api/v2/package
api_key:
secure: Smuwoi47XyX6b6x66VpPnnL96F3cl1nukALrFnZo1Oony38dzouByG7pnt6DX4HT
symbol_server: https://www.myget.org/F/phnx47-beta/symbols/api/v2/package
artifact: MyGet
on:
branch: master
appveyor_repo_tag: false
7 changes: 7 additions & 0 deletions pack.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if ($env:APPVEYOR_REPO_TAG -eq "false") {
dotnet pack $env:APPVEYOR_BUILD_FOLDER\src\Prometheus.Client.AspNetCore -c Release --include-symbols --no-build --version-suffix build$env:APPVEYOR_BUILD_NUMBER -o artifacts\myget
}

if ($env:APPVEYOR_REPO_TAG -eq "true") {
dotnet pack $env:APPVEYOR_BUILD_FOLDER\src\Prometheus.Client.AspNetCore -c Release --include-symbols --no-build -o artifacts\nuget
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Description>Middleware for the Prometheus.Client</Description>
<Copyright>2018 © Sergey Kuznetsov</Copyright>
<AssemblyTitle>Prometheus.Client.AspNetCore</AssemblyTitle>
<VersionPrefix>1.6.0</VersionPrefix>
<VersionPrefix>2.0.0</VersionPrefix>
<Authors>Sergey Kuznetsov</Authors>
<TargetFrameworks>netstandard1.3;netstandard2.0</TargetFrameworks>
<AssemblyName>Prometheus.Client.AspNetCore</AssemblyName>
Expand All @@ -18,9 +18,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<!-- for debug -->
<!--<PackageReference Include="Prometheus.Client" Version="1.6.0" />-->
<PackageReference Include="Prometheus.Client" Version="1.6.0-build45" />
<PackageReference Include="Prometheus.Client" Version="2.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3'">
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions">
Expand All @@ -32,4 +30,4 @@
<Version>2.0.0</Version>
</PackageReference>
</ItemGroup>
</Project>
</Project>

0 comments on commit 263b7f2

Please sign in to comment.