Skip to content

Commit

Permalink
Merge branch 'support/1.1.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldbarendse committed Oct 13, 2022
2 parents 5047e2d + a4283ed commit dc0fefd
Show file tree
Hide file tree
Showing 15 changed files with 1,502 additions and 214 deletions.
501 changes: 387 additions & 114 deletions .editorconfig

Large diffs are not rendered by default.

452 changes: 449 additions & 3 deletions .gitignore
100755 → 100644

Large diffs are not rendered by default.

83 changes: 83 additions & 0 deletions .globalconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
is_global = true

##########################################
# StyleCopAnalyzers Settings
##########################################

# All constant fields must be PascalCase
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1303.md
dotnet_naming_symbols.stylecop_constant_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private
dotnet_naming_symbols.stylecop_constant_fields_group.required_modifiers = const
dotnet_naming_symbols.stylecop_constant_fields_group.applicable_kinds = field
dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.symbols = stylecop_constant_fields_group
dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.style = pascal_case_style

# All static readonly fields must be PascalCase
# Ajusted to ignore private fields.
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1311.md
dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected
dotnet_naming_symbols.stylecop_static_readonly_fields_group.required_modifiers = static, readonly
dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_kinds = field
dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.symbols = stylecop_static_readonly_fields_group
dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.style = pascal_case_style

# No non-private instance fields are allowed
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1401.md
dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected
dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_kinds = field
dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.symbols = stylecop_fields_must_be_private_group
dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.style = disallowed_style

# Local variables must be camelCase
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1312.md
dotnet_naming_symbols.stylecop_local_fields_group.applicable_accessibilities = local
dotnet_naming_symbols.stylecop_local_fields_group.applicable_kinds = local
dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.symbols = stylecop_local_fields_group
dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.style = camel_case_style

##########################################
# StyleCopAnalyzers rule severity
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers
##########################################

dotnet_analyzer_diagnostic.category-StyleCop.CSharp.DocumentationRules.severity = suggestion
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.ReadabilityRules.severity = suggestion
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.NamingRules.severity = suggestion
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.SpacingRules.severity = suggestion
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.OrderingRules.severity = suggestion
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.MaintainabilityRules.severity = suggestion
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.LayoutRules.severity = suggestion

dotnet_diagnostic.SA1636.severity = none # SA1636: File header copyright text should match
dotnet_diagnostic.SA1101.severity = none # PrefixLocalCallsWithThis - stylecop appears to be ignoring dotnet_style_qualification_for_*
dotnet_diagnostic.SA1309.severity = none # FieldNamesMustNotBeginWithUnderscore

dotnet_diagnostic.SA1503.severity = warning # BracesMustNotBeOmitted
dotnet_diagnostic.SA1117.severity = warning # ParametersMustBeOnSameLineOrSeparateLines
dotnet_diagnostic.SA1116.severity = warning # SplitParametersMustStartOnLineAfterDeclaration
dotnet_diagnostic.SA1122.severity = warning # UseStringEmptyForEmptyStrings
dotnet_diagnostic.SA1028.severity = warning # CodeMustNotContainTrailingWhitespace
dotnet_diagnostic.SA1500.severity = warning # BracesForMultiLineStatementsMustNotShareLine
dotnet_diagnostic.SA1401.severity = warning # FieldsMustBePrivate
dotnet_diagnostic.SA1519.severity = warning # BracesMustNotBeOmittedFromMultiLineChildStatement
dotnet_diagnostic.SA1111.severity = warning # ClosingParenthesisMustBeOnLineOfLastParameter
dotnet_diagnostic.SA1520.severity = warning # UseBracesConsistently
dotnet_diagnostic.SA1407.severity = warning # ArithmeticExpressionsMustDeclarePrecedence
dotnet_diagnostic.SA1400.severity = warning # AccessModifierMustBeDeclared
dotnet_diagnostic.SA1119.severity = warning # StatementMustNotUseUnnecessaryParenthesis
dotnet_diagnostic.SA1649.severity = warning # FileNameMustMatchTypeName
dotnet_diagnostic.SA1121.severity = warning # UseBuiltInTypeAlias
dotnet_diagnostic.SA1132.severity = warning # DoNotCombineFields
dotnet_diagnostic.SA1134.severity = warning # AttributesMustNotShareLine
dotnet_diagnostic.SA1106.severity = warning # CodeMustNotContainEmptyStatements
dotnet_diagnostic.SA1312.severity = warning # VariableNamesMustBeginWithLowerCaseLetter
dotnet_diagnostic.SA1310.severity = warning # FieldNamesMustNotContainUnderscore
dotnet_diagnostic.SA1303.severity = warning # ConstFieldNamesMustBeginWithUpperCaseLetter
dotnet_diagnostic.SA1130.severity = warning # UseLambdaSyntax
dotnet_diagnostic.SA1405.severity = warning # DebugAssertMustProvideMessageText
dotnet_diagnostic.SA1205.severity = warning # PartialElementsMustDeclareAccess
dotnet_diagnostic.SA1306.severity = warning # FieldNamesMustBeginWithLowerCaseLetter
dotnet_diagnostic.SA1209.severity = warning # UsingAliasDirectivesMustBePlacedAfterOtherUsingDirectives
dotnet_diagnostic.SA1216.severity = warning # UsingStaticDirectivesMustBePlacedAtTheCorrectLocation
dotnet_diagnostic.SA1133.severity = warning # DoNotCombineAttributes
dotnet_diagnostic.SA1135.severity = warning # UsingDirectivesMustBeQualified
53 changes: 53 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<Project>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Company>Umbraco HQ</Company>
<Authors>Umbraco</Authors>
<Copyright>Copyright © Umbraco $([System.DateTime]::Today.ToString('yyyy'))</Copyright>
<Product>Umbraco Storage Providers</Product>
<PackageProjectUrl>https://github.com/umbraco/Umbraco.StorageProviders</PackageProjectUrl>
<PackageIconUrl>https://umbraco.com/dist/nuget/logo-small.png</PackageIconUrl>
<PackageIcon>icon.png</PackageIcon>
<PackageTags>umbraco storage</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AnalysisMode>All</AnalysisMode>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.113" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Umbraco.Code" Version="2.0.0" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.1.1" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>

<!-- NuGet packages lock -->
<PropertyGroup>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<DefaultItemExcludes>$(DefaultItemExcludes);packages.lock.json</DefaultItemExcludes>
</PropertyGroup>

<!-- SourceLink -->
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)icon.png" Pack="true" PackagePath="" Visible="false" />
</ItemGroup>

<PropertyGroup>
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="Umbraco Prereleases" value="https://www.myget.org/F/umbracoprereleases/api/v3/index.json" />
<add key="Umbraco Nightly" value="https://www.myget.org/F/umbraconightly/api/v3/index.json" />
Expand Down
6 changes: 5 additions & 1 deletion Umbraco.StorageProviders.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
.globalconfig = .globalconfig
azure-pipelines.yml = azure-pipelines.yml
src\Directory.Build.props = src\Directory.Build.props
Directory.Build.props = Directory.Build.props
global.json = global.json
icon.png = icon.png
LICENSE = LICENSE
NuGet.config = NuGet.config
README.md = README.md
version.json = version.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.StorageProviders", "src\Umbraco.StorageProviders\Umbraco.StorageProviders.csproj", "{5EC38982-2C9A-4D8D-AAE2-743A690FCD71}"
Expand Down
45 changes: 33 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: $(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)

parameters:
- name: cache_nuget
displayName: Cache NuGet packages
Expand All @@ -7,38 +9,57 @@ parameters:
variables:
solution: Umbraco.StorageProviders.sln
buildConfiguration: Release
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
DOTNET_NOLOGO: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

stages:
- stage: Artifacts
- stage: Build
variables:
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
jobs:
- job: Build
pool:
vmImage: windows-latest
vmImage: 'ubuntu-latest'
steps:
# Checkout source (avoid shallow clone to calculate version height)
- checkout: self
fetchDepth: 0

# Setup build environment
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true

# Cache and restore NuGet packages
- task: Cache@2
condition: ${{parameters.cache_nuget}}
condition: ${{ parameters.cache_nuget }}
displayName: Cache NuGet packages
inputs:
key: 'nuget | "$(Agent.OS)" | **/packages.lock.json'
restoreKeys: |
nuget | "$(Agent.OS)"
nuget
path: $(NUGET_PACKAGES)
displayName: Cache NuGet packages
cacheHitVar: 'CACHE_NUGET_RESTORED'

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

- script: dotnet build $(solution) -c $(buildConfiguration) -p:ContinuousIntegrationBuild=true --no-restore
displayName: Build
# Build
- script: dotnet build $(solution) --configuration $(buildConfiguration) --no-restore -p:ContinuousIntegrationBuild=true
displayName: Run dotnet build

- script: dotnet pack $(solution) -c $(buildConfiguration) -o $(Build.ArtifactStagingDirectory) --no-restore --no-build
displayName: Pack
# Pack
- script: dotnet pack $(solution) --configuration $(buildConfiguration) --no-build --output $(Build.ArtifactStagingDirectory)/nupkg
displayName: Run dotnet pack

- task: PublishBuildArtifacts@1
inputs:
ArtifactName: nupkg
# Publish
- task: PublishPipelineArtifact@1
displayName: Publish NuGet packages
inputs:
targetPath: $(Build.ArtifactStagingDirectory)/nupkg
artifactName: nupkg
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "6.0.100",
"rollForward": "latestFeature"
}
}
Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 0 additions & 40 deletions src/Directory.Build.props

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<AnalysisMode>All</AnalysisMode>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Azure Blob Storage provider for Umbraco CMS</Description>
<PackageTags>umbraco storage azure blob</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Umbraco.Cms.Web.Common" Version="[10.0.0, 11.0.0)" />
<PackageReference Include="SixLabors.ImageSharp.Web.Providers.Azure" Version="2.0.1" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.12.0" />
<ProjectReference Include="..\Umbraco.StorageProviders\Umbraco.StorageProviders.csproj" />
</ItemGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Umbraco Storage Providers - Azure Blob Storage</Title>
<Description>Azure Blob Storage provider for Umbraco CMS.</Description>
<PackageTags>umbraco storage azure blob</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Umbraco.Cms.Web.Common" Version="[10.0.0, 11.0.0)" />
<PackageReference Include="SixLabors.ImageSharp.Web.Providers.Azure" Version="2.0.1" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.12.0" />
<ProjectReference Include="..\Umbraco.StorageProviders\Umbraco.StorageProviders.csproj" />
</ItemGroup>
</Project>
Loading

0 comments on commit dc0fefd

Please sign in to comment.