Skip to content

Commit 0d23684

Browse files
Merge pull request #7 from umbraco/feature/dependency-updates
Update to .NET 6 and Umbraco.StorageProviders.AzureBlob v2
2 parents 5b74f6d + 627ea13 commit 0d23684

14 files changed

+2501
-451
lines changed

.editorconfig

Lines changed: 106 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,55 @@
1-
# editorconfig.org
2-
3-
# top-most EditorConfig file
41
root = true
52

6-
# Default settings:
7-
# A newline ending every file
8-
# Use 4 spaces as indentation
93
[*]
104
insert_final_newline = true
115
end_of_line = lf
126
indent_style = space
137
indent_size = 4
14-
15-
# Trim trailing whitespace, limited support.
16-
# https://github.com/editorconfig/editorconfig/wiki/Property-research:-Trim-trailing-spaces
178
trim_trailing_whitespace = true
189

10+
csharp_indent_braces = false
11+
csharp_indent_case_contents = true
12+
csharp_indent_labels = one_less_than_current
13+
csharp_prefer_braces = true:warning
14+
csharp_prefer_simple_default_expression = true:suggestion
15+
csharp_prefer_simple_using_statement = true:suggestion
16+
csharp_prefer_static_local_function = true:suggestion
17+
csharp_space_around_binary_operators = before_and_after
18+
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
19+
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
20+
csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
21+
csharp_style_conditional_delegate_call = true:suggestion
22+
csharp_style_deconstructed_variable_declaration = true:suggestion
23+
csharp_style_expression_bodied_accessors = true:silent
24+
csharp_style_expression_bodied_constructors = true:silent
25+
csharp_style_expression_bodied_indexers = true:silent
26+
csharp_style_expression_bodied_lambdas = true:silent
27+
csharp_style_expression_bodied_local_functions = false:silent
28+
csharp_style_expression_bodied_methods = true:silent
29+
csharp_style_expression_bodied_operators = true:silent
30+
csharp_style_expression_bodied_properties = true:silent
31+
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
32+
csharp_style_inlined_variable_declaration = true:suggestion
33+
csharp_style_namespace_declarations = block_scoped:silent
34+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
35+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
36+
csharp_style_prefer_extended_property_pattern = true:suggestion
37+
csharp_style_prefer_index_operator = true:suggestion
38+
csharp_style_prefer_local_over_anonymous_function = true:suggestion
39+
csharp_style_prefer_not_pattern = true:suggestion
40+
csharp_style_prefer_null_check_over_type_check = true:suggestion
41+
csharp_style_prefer_pattern_matching = true:silent
42+
csharp_style_prefer_range_operator = true:suggestion
43+
csharp_style_prefer_switch_expression = true:suggestion
44+
csharp_style_prefer_tuple_swap = true:suggestion
45+
csharp_style_throw_expression = true:suggestion
46+
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
47+
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
48+
csharp_style_var_elsewhere = false:silent
49+
csharp_style_var_for_built_in_types = false:silent
50+
csharp_style_var_when_type_is_apparent = false:silent
51+
csharp_using_directive_placement = outside_namespace:silent
52+
1953
[*.md]
2054
insert_final_newline = false
2155
trim_trailing_whitespace = false
@@ -24,14 +58,70 @@ trim_trailing_whitespace = false
2458
indent_size = 2
2559

2660
[*.{cs,vb}]
27-
dotnet_style_predefined_type_for_locals_parameters_members = true:error
61+
tab_width = 4
2862

29-
dotnet_naming_rule.private_members_with_underscore.symbols = private_fields
30-
dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore
63+
dotnet_code_quality_unused_parameters = all:suggestion
3164
dotnet_naming_rule.private_members_with_underscore.severity = suggestion
32-
33-
dotnet_naming_symbols.private_fields.applicable_kinds = field
34-
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
35-
65+
dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore
66+
dotnet_naming_rule.private_members_with_underscore.symbols = private_fields
3667
dotnet_naming_style.prefix_underscore.capitalization = camel_case
3768
dotnet_naming_style.prefix_underscore.required_prefix = _
69+
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
70+
dotnet_naming_symbols.private_fields.applicable_kinds = field
71+
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
72+
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
73+
dotnet_style_coalesce_expression = true:suggestion
74+
dotnet_style_collection_initializer = true:suggestion
75+
dotnet_style_explicit_tuple_names = true:suggestion
76+
dotnet_style_namespace_match_folder = true:suggestion
77+
dotnet_style_null_propagation = true:suggestion
78+
dotnet_style_object_initializer = true:suggestion
79+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
80+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
81+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
82+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
83+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
84+
dotnet_style_predefined_type_for_locals_parameters_members = true:error
85+
dotnet_style_predefined_type_for_member_access = true:silent
86+
dotnet_style_prefer_auto_properties = true:silent
87+
dotnet_style_prefer_compound_assignment = true:suggestion
88+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
89+
dotnet_style_prefer_conditional_expression_over_return = true:silent
90+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
91+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
92+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
93+
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
94+
dotnet_style_prefer_simplified_interpolation = true:suggestion
95+
dotnet_style_qualification_for_event = false:silent
96+
dotnet_style_qualification_for_field = false:silent
97+
dotnet_style_qualification_for_method = false:silent
98+
dotnet_style_qualification_for_property = false:silent
99+
dotnet_style_readonly_field = true:suggestion
100+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
101+
102+
# CA1054: URI parameters should not be strings
103+
dotnet_diagnostic.CA1054.severity = suggestion
104+
105+
# CA1055: URI-like return values should not be strings
106+
dotnet_diagnostic.CA1055.severity = none
107+
108+
# RS0048: Missing shipped or unshipped public API file
109+
dotnet_public_api_analyzer.require_api_files = true
110+
111+
# SA1101: Prefix local calls with this
112+
dotnet_diagnostic.SA1101.severity = none
113+
114+
# SA1309: Field names should not begin with underscore
115+
dotnet_diagnostic.SA1309.severity = none
116+
117+
# SA1413: Use trailing comma in multi-line initializers
118+
dotnet_diagnostic.SA1413.severity = none
119+
120+
# SA1502: Element should not be on a single line
121+
dotnet_diagnostic.SA1502.severity = none
122+
123+
# SA1625: Element documentation should not be copied and pasted
124+
dotnet_diagnostic.SA1625.severity = none
125+
126+
# SA1633: File should have header
127+
dotnet_diagnostic.SA1633.severity = none

.gitignore

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
*.dll
2-
*.exe
3-
*.log
4-
*.nupkg
51
*.suo
62
*.user
73

@@ -10,8 +6,3 @@
106
.vscode/
117
[Bb]in/
128
[Oo]bj/
13-
14-
15-
Build/temp
16-
build.out/
17-
build.tmp/

NuGet.config

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

Umbraco.Cloud.StorageProviders.AzureBlob.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1010
.editorconfig = .editorconfig
1111
.gitattributes = .gitattributes
1212
.gitignore = .gitignore
13+
azure-pipelines.yml = azure-pipelines.yml
1314
src\Directory.Build.props = src\Directory.Build.props
1415
LICENSE = LICENSE
1516
NuGet.config = NuGet.config

azure-pipelines.yml

Lines changed: 35 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,37 @@
11
variables:
2-
buildConfiguration: Release
3-
slnFilename: Umbraco.Cloud.StorageProviders.AzureBlob.sln
4-
stages:
5-
- stage: Artifacts
6-
dependsOn: []
7-
jobs:
8-
- job: Build_Artifacts
9-
displayName: Build Artifacts
10-
pool:
11-
vmImage: windows-latest
12-
steps:
13-
- task: UseDotNet@2
14-
displayName: Use .Net Core sdk 5.x
15-
inputs:
16-
version: 5.x
17-
- task: NuGetToolInstaller@1
18-
displayName: Use NuGet Latest
19-
- task: NuGetCommand@2
20-
displayName: Restore NuGet Packages
21-
inputs:
22-
restoreSolution: $(slnFilename)
23-
feedsToUse: config
24-
- task: PowerShell@1
25-
displayName: Update Version and Artifact Name
26-
inputs:
27-
scriptType: inlineScript
28-
inlineScript: >
29-
Write-Host "Working folder: $pwd"
30-
31-
$ubuild = build/build.ps1 -get -continue
32-
33-
34-
$version = $ubuild.GetUmbracoVersion()
35-
36-
$isRelease = [regex]::matches($env:BUILD_SOURCEBRANCH,"v\d+\/\d+.\d+.*")
37-
38-
39-
if ($isRelease.Count -gt 0){
40-
$continuous = $version.Semver
41-
Write-Host "##vso[build.addbuildtag]Release build"
42-
}
43-
else
44-
{
45-
$date = (Get-Date).ToString("yyyyMMdd")
46-
$continuous = "$($version.release)-preview$date.$(Build.BuildId)"
47-
$ubuild.SetUmbracoVersion($continuous)
2+
solution: Umbraco.Cloud.StorageProviders.AzureBlob.sln
3+
buildConfiguration: Release
4+
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
5+
DOTNET_NOLOGO: true
6+
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
7+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
488

49-
Write-Host "##vso[build.addbuildtag]Continuous build"
50-
}
51-
52-
Write-Host "##vso[build.updatebuildnumber]$continuous.$(Build.BuildId)"
53-
54-
Write-Host "Building: $continuous"
55-
- task: PowerShell@1
56-
displayName: Prepare Build
57-
inputs:
58-
scriptType: inlineScript
59-
inlineScript: |
60-
Write-Host "Working folder: $pwd"
61-
$ubuild = build\build.ps1 -get
62-
63-
$ubuild.PrepareBuild("vso")
64-
- task: PowerShell@1
65-
displayName: Prepare Packages & Zip
66-
inputs:
67-
scriptType: inlineScript
68-
inlineScript: |
69-
Write-Host "Working folder: $pwd"
70-
$ubuild = build\build.ps1 -get -continue
71-
72-
$ubuild.CompileUmbracoCloudStorageProvidersAzureBlob()
73-
$ubuild.PreparePackages()
74-
- task: PowerShell@1
75-
displayName: Verify & Package NuGet
76-
inputs:
77-
scriptType: inlineScript
78-
inlineScript: |
79-
Write-Host "Working folder: $pwd"
80-
$ubuild = build\build.ps1 -get -continue
81-
82-
$ubuild.PackageNuGet()
83-
- task: CopyFiles@2
84-
displayName: Copy NuPkg Files to Staging
85-
inputs:
86-
SourceFolder: build.out
87-
Contents: '*.nupkg'
88-
TargetFolder: $(build.artifactstagingdirectory)
89-
CleanTargetFolder: true
90-
- task: PublishBuildArtifacts@1
91-
displayName: Publish NuPkg Files
92-
inputs:
93-
PathtoPublish: $(build.artifactstagingdirectory)
94-
ArtifactName: nupkg
95-
- task: CopyFiles@2
96-
displayName: Copy Log Files to Staging
97-
inputs:
98-
SourceFolder: build.tmp
99-
Contents: '*.log'
100-
TargetFolder: $(build.artifactstagingdirectory)
101-
CleanTargetFolder: true
102-
condition: succeededOrFailed()
103-
- task: PublishBuildArtifacts@1
104-
displayName: Publish Log Files
105-
inputs:
106-
PathtoPublish: $(build.artifactstagingdirectory)
107-
ArtifactName: logs
108-
condition: succeededOrFailed()
9+
stages:
10+
- stage: Artifacts
11+
jobs:
12+
- job: Build
13+
pool:
14+
vmImage: windows-latest
15+
steps:
16+
- task: Cache@2
17+
inputs:
18+
key: 'nuget | "$(Agent.OS)" | **/packages.lock.json'
19+
restoreKeys: |
20+
nuget | "$(Agent.OS)"
21+
nuget
22+
path: $(NUGET_PACKAGES)
23+
displayName: Cache NuGet packages
24+
25+
- script: dotnet restore $(solution) --locked-mode
26+
displayName: Restore NuGet packages
27+
28+
- script: dotnet build $(solution) -c $(buildConfiguration) -p:ContinuousIntegrationBuild=true --no-restore
29+
displayName: Build
30+
31+
- script: dotnet pack $(solution) -c $(buildConfiguration) -o $(Build.ArtifactStagingDirectory) --no-restore --no-build
32+
displayName: Pack
33+
34+
- task: PublishBuildArtifacts@1
35+
inputs:
36+
ArtifactName: nupkg
37+
displayName: Publish NuGet packages

0 commit comments

Comments
 (0)