Skip to content

Commit dc0fefd

Browse files
Merge branch 'support/1.1.x'
2 parents 5047e2d + a4283ed commit dc0fefd

15 files changed

+1502
-214
lines changed

.editorconfig

Lines changed: 387 additions & 114 deletions
Large diffs are not rendered by default.

.gitignore

100755100644
Lines changed: 449 additions & 3 deletions
Large diffs are not rendered by default.

.globalconfig

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
is_global = true
2+
3+
##########################################
4+
# StyleCopAnalyzers Settings
5+
##########################################
6+
7+
# All constant fields must be PascalCase
8+
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1303.md
9+
dotnet_naming_symbols.stylecop_constant_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private
10+
dotnet_naming_symbols.stylecop_constant_fields_group.required_modifiers = const
11+
dotnet_naming_symbols.stylecop_constant_fields_group.applicable_kinds = field
12+
dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.symbols = stylecop_constant_fields_group
13+
dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.style = pascal_case_style
14+
15+
# All static readonly fields must be PascalCase
16+
# Ajusted to ignore private fields.
17+
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1311.md
18+
dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected
19+
dotnet_naming_symbols.stylecop_static_readonly_fields_group.required_modifiers = static, readonly
20+
dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_kinds = field
21+
dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.symbols = stylecop_static_readonly_fields_group
22+
dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.style = pascal_case_style
23+
24+
# No non-private instance fields are allowed
25+
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1401.md
26+
dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected
27+
dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_kinds = field
28+
dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.symbols = stylecop_fields_must_be_private_group
29+
dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.style = disallowed_style
30+
31+
# Local variables must be camelCase
32+
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1312.md
33+
dotnet_naming_symbols.stylecop_local_fields_group.applicable_accessibilities = local
34+
dotnet_naming_symbols.stylecop_local_fields_group.applicable_kinds = local
35+
dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.symbols = stylecop_local_fields_group
36+
dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.style = camel_case_style
37+
38+
##########################################
39+
# StyleCopAnalyzers rule severity
40+
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers
41+
##########################################
42+
43+
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.DocumentationRules.severity = suggestion
44+
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.ReadabilityRules.severity = suggestion
45+
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.NamingRules.severity = suggestion
46+
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.SpacingRules.severity = suggestion
47+
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.OrderingRules.severity = suggestion
48+
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.MaintainabilityRules.severity = suggestion
49+
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.LayoutRules.severity = suggestion
50+
51+
dotnet_diagnostic.SA1636.severity = none # SA1636: File header copyright text should match
52+
dotnet_diagnostic.SA1101.severity = none # PrefixLocalCallsWithThis - stylecop appears to be ignoring dotnet_style_qualification_for_*
53+
dotnet_diagnostic.SA1309.severity = none # FieldNamesMustNotBeginWithUnderscore
54+
55+
dotnet_diagnostic.SA1503.severity = warning # BracesMustNotBeOmitted
56+
dotnet_diagnostic.SA1117.severity = warning # ParametersMustBeOnSameLineOrSeparateLines
57+
dotnet_diagnostic.SA1116.severity = warning # SplitParametersMustStartOnLineAfterDeclaration
58+
dotnet_diagnostic.SA1122.severity = warning # UseStringEmptyForEmptyStrings
59+
dotnet_diagnostic.SA1028.severity = warning # CodeMustNotContainTrailingWhitespace
60+
dotnet_diagnostic.SA1500.severity = warning # BracesForMultiLineStatementsMustNotShareLine
61+
dotnet_diagnostic.SA1401.severity = warning # FieldsMustBePrivate
62+
dotnet_diagnostic.SA1519.severity = warning # BracesMustNotBeOmittedFromMultiLineChildStatement
63+
dotnet_diagnostic.SA1111.severity = warning # ClosingParenthesisMustBeOnLineOfLastParameter
64+
dotnet_diagnostic.SA1520.severity = warning # UseBracesConsistently
65+
dotnet_diagnostic.SA1407.severity = warning # ArithmeticExpressionsMustDeclarePrecedence
66+
dotnet_diagnostic.SA1400.severity = warning # AccessModifierMustBeDeclared
67+
dotnet_diagnostic.SA1119.severity = warning # StatementMustNotUseUnnecessaryParenthesis
68+
dotnet_diagnostic.SA1649.severity = warning # FileNameMustMatchTypeName
69+
dotnet_diagnostic.SA1121.severity = warning # UseBuiltInTypeAlias
70+
dotnet_diagnostic.SA1132.severity = warning # DoNotCombineFields
71+
dotnet_diagnostic.SA1134.severity = warning # AttributesMustNotShareLine
72+
dotnet_diagnostic.SA1106.severity = warning # CodeMustNotContainEmptyStatements
73+
dotnet_diagnostic.SA1312.severity = warning # VariableNamesMustBeginWithLowerCaseLetter
74+
dotnet_diagnostic.SA1310.severity = warning # FieldNamesMustNotContainUnderscore
75+
dotnet_diagnostic.SA1303.severity = warning # ConstFieldNamesMustBeginWithUpperCaseLetter
76+
dotnet_diagnostic.SA1130.severity = warning # UseLambdaSyntax
77+
dotnet_diagnostic.SA1405.severity = warning # DebugAssertMustProvideMessageText
78+
dotnet_diagnostic.SA1205.severity = warning # PartialElementsMustDeclareAccess
79+
dotnet_diagnostic.SA1306.severity = warning # FieldNamesMustBeginWithLowerCaseLetter
80+
dotnet_diagnostic.SA1209.severity = warning # UsingAliasDirectivesMustBePlacedAfterOtherUsingDirectives
81+
dotnet_diagnostic.SA1216.severity = warning # UsingStaticDirectivesMustBePlacedAtTheCorrectLocation
82+
dotnet_diagnostic.SA1133.severity = warning # DoNotCombineAttributes
83+
dotnet_diagnostic.SA1135.severity = warning # UsingDirectivesMustBeQualified

Directory.Build.props

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<Project>
2+
<PropertyGroup>
3+
<TargetFramework>net6.0</TargetFramework>
4+
<Company>Umbraco HQ</Company>
5+
<Authors>Umbraco</Authors>
6+
<Copyright>Copyright © Umbraco $([System.DateTime]::Today.ToString('yyyy'))</Copyright>
7+
<Product>Umbraco Storage Providers</Product>
8+
<PackageProjectUrl>https://github.com/umbraco/Umbraco.StorageProviders</PackageProjectUrl>
9+
<PackageIconUrl>https://umbraco.com/dist/nuget/logo-small.png</PackageIconUrl>
10+
<PackageIcon>icon.png</PackageIcon>
11+
<PackageTags>umbraco storage</PackageTags>
12+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
13+
<NeutralLanguage>en-US</NeutralLanguage>
14+
<ImplicitUsings>enable</ImplicitUsings>
15+
<Nullable>enable</Nullable>
16+
<WarningsAsErrors>Nullable</WarningsAsErrors>
17+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
18+
<AnalysisMode>All</AnalysisMode>
19+
</PropertyGroup>
20+
21+
<ItemGroup>
22+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.113" PrivateAssets="all" IsImplicitlyDefined="true" />
23+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="all" IsImplicitlyDefined="true" />
24+
<PackageReference Include="Umbraco.Code" Version="2.0.0" PrivateAssets="all" IsImplicitlyDefined="true" />
25+
<PackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.1.1" PrivateAssets="all" IsImplicitlyDefined="true" />
26+
</ItemGroup>
27+
28+
<!-- NuGet packages lock -->
29+
<PropertyGroup>
30+
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
31+
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
32+
<DefaultItemExcludes>$(DefaultItemExcludes);packages.lock.json</DefaultItemExcludes>
33+
</PropertyGroup>
34+
35+
<!-- SourceLink -->
36+
<PropertyGroup>
37+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
38+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
39+
<IncludeSymbols>true</IncludeSymbols>
40+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
41+
</PropertyGroup>
42+
<ItemGroup>
43+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
44+
</ItemGroup>
45+
46+
<ItemGroup>
47+
<Content Include="$(MSBuildThisFileDirectory)icon.png" Pack="true" PackagePath="" Visible="false" />
48+
</ItemGroup>
49+
50+
<PropertyGroup>
51+
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
52+
</PropertyGroup>
53+
</Project>

NuGet.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4+
<clear />
45
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
56
<add key="Umbraco Prereleases" value="https://www.myget.org/F/umbracoprereleases/api/v3/index.json" />
67
<add key="Umbraco Nightly" value="https://www.myget.org/F/umbraconightly/api/v3/index.json" />

Umbraco.StorageProviders.sln

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1010
.editorconfig = .editorconfig
1111
.gitattributes = .gitattributes
1212
.gitignore = .gitignore
13+
.globalconfig = .globalconfig
1314
azure-pipelines.yml = azure-pipelines.yml
14-
src\Directory.Build.props = src\Directory.Build.props
15+
Directory.Build.props = Directory.Build.props
16+
global.json = global.json
17+
icon.png = icon.png
1518
LICENSE = LICENSE
1619
NuGet.config = NuGet.config
1720
README.md = README.md
21+
version.json = version.json
1822
EndProjectSection
1923
EndProject
2024
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.StorageProviders", "src\Umbraco.StorageProviders\Umbraco.StorageProviders.csproj", "{5EC38982-2C9A-4D8D-AAE2-743A690FCD71}"

azure-pipelines.yml

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: $(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
2+
13
parameters:
24
- name: cache_nuget
35
displayName: Cache NuGet packages
@@ -7,38 +9,57 @@ parameters:
79
variables:
810
solution: Umbraco.StorageProviders.sln
911
buildConfiguration: Release
10-
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
1112
DOTNET_NOLOGO: true
1213
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
1314
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
15+
DOTNET_CLI_TELEMETRY_OPTOUT: true
1416

1517
stages:
16-
- stage: Artifacts
18+
- stage: Build
19+
variables:
20+
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
1721
jobs:
1822
- job: Build
1923
pool:
20-
vmImage: windows-latest
24+
vmImage: 'ubuntu-latest'
2125
steps:
26+
# Checkout source (avoid shallow clone to calculate version height)
27+
- checkout: self
28+
fetchDepth: 0
29+
30+
# Setup build environment
31+
- task: UseDotNet@2
32+
displayName: Use .NET SDK from global.json
33+
inputs:
34+
useGlobalJson: true
35+
36+
# Cache and restore NuGet packages
2237
- task: Cache@2
23-
condition: ${{parameters.cache_nuget}}
38+
condition: ${{ parameters.cache_nuget }}
39+
displayName: Cache NuGet packages
2440
inputs:
2541
key: 'nuget | "$(Agent.OS)" | **/packages.lock.json'
2642
restoreKeys: |
2743
nuget | "$(Agent.OS)"
2844
nuget
2945
path: $(NUGET_PACKAGES)
30-
displayName: Cache NuGet packages
46+
cacheHitVar: 'CACHE_NUGET_RESTORED'
3147

3248
- script: dotnet restore $(solution) --locked-mode
49+
condition: or(not(${{ parameters.cache_nuget }}), ne(variables.CACHE_NUGET_RESTORED, true))
3350
displayName: Restore NuGet packages
3451

35-
- script: dotnet build $(solution) -c $(buildConfiguration) -p:ContinuousIntegrationBuild=true --no-restore
36-
displayName: Build
52+
# Build
53+
- script: dotnet build $(solution) --configuration $(buildConfiguration) --no-restore -p:ContinuousIntegrationBuild=true
54+
displayName: Run dotnet build
3755

38-
- script: dotnet pack $(solution) -c $(buildConfiguration) -o $(Build.ArtifactStagingDirectory) --no-restore --no-build
39-
displayName: Pack
56+
# Pack
57+
- script: dotnet pack $(solution) --configuration $(buildConfiguration) --no-build --output $(Build.ArtifactStagingDirectory)/nupkg
58+
displayName: Run dotnet pack
4059

41-
- task: PublishBuildArtifacts@1
42-
inputs:
43-
ArtifactName: nupkg
60+
# Publish
61+
- task: PublishPipelineArtifact@1
4462
displayName: Publish NuGet packages
63+
inputs:
64+
targetPath: $(Build.ArtifactStagingDirectory)/nupkg
65+
artifactName: nupkg

global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"version": "6.0.100",
4+
"rollForward": "latestFeature"
5+
}
6+
}

icon.png

-372 Bytes
Loading

src/Directory.Build.props

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

0 commit comments

Comments
 (0)