Skip to content

Commit ee21654

Browse files
Newtonsoft v13 (#2)
Upgrades Newtonsoft to v13
1 parent 92fb57e commit ee21654

19 files changed

+204
-402
lines changed

.editorconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Baseline
5+
[*]
6+
charset = utf-8
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 4
10+
trim_trailing_whitespace = true
11+
max_line_length = 160
12+
13+
[*.{yml,json}]
14+
indent_size = 2
15+
16+
# Xml project files
17+
[*.{csproj}]
18+
indent_size = 2
19+
20+
# Xml files (data, config, projects)
21+
[*.{xml,props,targets,config,csproj}]
22+
indent_size = 2
23+
24+
# Shell scripts
25+
[*.sh]
26+
end_of_line = lf
27+
28+
# C#
29+
[*.cs]
30+
charset = utf-8-bom
31+
dotnet_sort_system_directives_first = true

.gitignore

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
# node
2-
node_modules/
3-
41
# vs
52
.vs/
6-
[Aa]pp_[Dd]ata/
73
[Bb]in/
84
[D]ebug/
95
[Aa]rtifacts/
@@ -15,13 +11,11 @@ node_modules/
1511
*.vssscc
1612
*.suo
1713
*.cache
18-
project.lock.json
19-
packages/
2014

21-
# deploy
22-
build/
23-
tools/
24-
!tools/packages.config
15+
# config
16+
.env
17+
*.local
18+
*.local.json
2519

2620
# misc
2721
*~
@@ -30,6 +24,12 @@ tools/
3024
*.orig
3125
*.pfx
3226

27+
# rider
28+
.idea
29+
30+
# vs-code
31+
.vscode
32+
3333
# resharper
3434
_ReSharper.*
3535
*.resharper*

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016, 2017, 2018 Daniel Wertheim
3+
Copyright (c) 2016-2021 Daniel Wertheim
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# JsonNet.ContractResolvers
2+
[![NuGet](https://img.shields.io/nuget/v/JsonNet.ContractResolvers.svg?cacheSeconds=3600)](https://www.nuget.org/packages/JsonNet.ContractResolvers)
3+
[![License MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://choosealicense.com/licenses/mit/)
4+
[![Build Status](https://dev.azure.com/daniel-wertheim/os/_apis/build/status/jsonnet-contractresolvers-CI?branchName=master)](https://dev.azure.com/daniel-wertheim/os/_build/latest?definitionId=11&branchName=master)
5+
26
Tiny solution providing pre-made `ContractResolver` implementations for [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json), resolvers that supports private property setters and private constructors.
37

48
## Replaces eariler repos and NuGets
@@ -30,4 +34,4 @@ var settings = new JsonSerializerSettings
3034
};
3135

3236
var model = JsonConvert.DeserializeObject<Model>(json, settings);
33-
```
37+
```
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: $(SemVer)
2+
3+
variables:
4+
BuildConfiguration: Release
5+
SemVer: $[ variables['Build.SourceBranchName'] ]
6+
CommitId: $(Build.SourceVersion)
7+
8+
trigger:
9+
batch: true
10+
branches:
11+
include:
12+
- refs/tags/*
13+
14+
pr: none
15+
16+
pool:
17+
vmImage: ubuntu-latest
18+
19+
stages:
20+
- template: stage-build.yml
21+
- template: stage-deploy.yml
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: $(SemVer)
2+
3+
variables:
4+
BuildConfiguration: Release
5+
BuildRev: $[counter(format('{0:yyyyMMdd}', pipeline.startTime), 1)]
6+
SemVer: $[format('{0:yyyy}.{0:MM}.{0:dd}-pre{1}', pipeline.startTime, variables.BuildRev)]
7+
CommitId: $(Build.SourceVersion)
8+
9+
trigger:
10+
batch: true
11+
branches:
12+
include:
13+
- master
14+
15+
pr:
16+
autoCancel: true
17+
branches:
18+
include:
19+
- master
20+
21+
pool:
22+
vmImage: ubuntu-latest
23+
24+
stages:
25+
- template: stage-build.yml

azure-devops/stage-build.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
stages:
2+
- stage: Build
3+
jobs:
4+
- job: BuildTestPack
5+
displayName: 'Build, test & pack'
6+
timeoutInMinutes: 5
7+
cancelTimeoutInMinutes: 2
8+
steps:
9+
10+
- task: UseDotNet@2
11+
displayName: 'Use .NET Core 5.x'
12+
inputs:
13+
version: '5.x'
14+
packageType: sdk
15+
16+
- task: DotNetCoreCLI@2
17+
displayName: 'Build Solution'
18+
inputs:
19+
command: build
20+
projects: 'src/*.sln'
21+
arguments: '-c $(BuildConfiguration) --no-incremental --nologo -p:TreatWarningsAsErrors=true -p:Version=$(SemVer) -p:InformationalVersion=$(CommitId)'
22+
23+
- task: DotNetCoreCLI@2
24+
displayName: 'UnitTests'
25+
inputs:
26+
command: test
27+
projects: 'src/**/UnitTests.csproj'
28+
arguments: '-c $(BuildConfiguration) --no-build'
29+
testRunTitle: 'UnitTests'
30+
31+
- task: DotNetCoreCLI@2
32+
displayName: 'Pack Nupkg'
33+
inputs:
34+
command: custom
35+
custom: pack
36+
projects: 'src/*.sln'
37+
arguments: '-c $(BuildConfiguration) --no-build -o $(Build.ArtifactStagingDirectory) -p:Version=$(SemVer) -p:InformationalVersion=$(CommitId)'
38+
39+
- task: PublishPipelineArtifact@1
40+
displayName: 'Publish Artifacts'
41+
inputs:
42+
path: '$(Build.ArtifactStagingDirectory)'
43+
artifact: Artifacts

azure-devops/stage-deploy.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
stages:
2+
- stage: Deploy
3+
condition: and (succeeded(), startsWith( variables['Build.SourceBranch'], 'refs/tags' ))
4+
dependsOn: Build
5+
jobs:
6+
- deployment: DeployArtifacts
7+
environment: 'Prod'
8+
displayName: 'Deploys artifacts'
9+
timeoutInMinutes: 4
10+
cancelTimeoutInMinutes: 2
11+
strategy:
12+
runOnce:
13+
deploy:
14+
steps:
15+
- checkout: none
16+
- task: NuGetCommand@2
17+
displayName: 'Push Nupkg to NuGet'
18+
inputs:
19+
command: push
20+
nugetFeedType: external
21+
publishFeedCredentials: nuget_push
22+
verbosityPush: Normal
23+
packagesToPush: '$(Pipeline.Workspace)/**/*.nupkg;!$(Pipeline.Workspace)/**/*.symbols.nupkg'

build.cake

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)