Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with v6 #35

Merged
merged 8 commits into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions Autofac.Mvc.sln
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Autofac.Integration.Mvc", "src\Autofac.Integration.Mvc\Autofac.Integration.Mvc.csproj", "{DD874E64-C7EC-464D-925F-CF4A709EDEEF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Autofac.Integration.Mvc.Test", "test\Autofac.Integration.Mvc.Test\Autofac.Integration.Mvc.Test.csproj", "{438022BC-2202-4F9D-A3AD-6EA84DB947D2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{68332651-45D8-43EF-8A24-314BAD10B21E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0B99C973-4B57-402F-85DA-579669EC6D6D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B8552707-984B-4F02-917E-2B9D5D5B6945}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
appveyor.yml = appveyor.yml
LICENSE = LICENSE
NuGet.Config = NuGet.Config
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -25,4 +38,11 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{DD874E64-C7EC-464D-925F-CF4A709EDEEF} = {68332651-45D8-43EF-8A24-314BAD10B21E}
{438022BC-2202-4F9D-A3AD-6EA84DB947D2} = {0B99C973-4B57-402F-85DA-579669EC6D6D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {00D81BB0-3A31-4F38-B1DC-4FC384034777}
EndGlobalSection
EndGlobal
12 changes: 0 additions & 12 deletions Full.ruleset

This file was deleted.

36 changes: 19 additions & 17 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
environment:
package_semantic_version: 5.0.0
assembly_semantic_version: 5.0.0
version: 6.0.0.{build}

dotnet_csproj:
version_prefix: '6.0.0'
patch: true
file: 'src\**\*.csproj'

configuration: Release

version: $(package_semantic_version).{build}
image: Visual Studio 2019

environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
NUGET_XMLDOC_MODE: skip

skip_tags: true

assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '$(assembly_semantic_version).0'
assembly_file_version: '$(appveyor_build_version)'
assembly_informational_version: '$(package_semantic_version)-CI-{build}'
nuget:
disable_publish_on_pr: true

configuration: Release
clone_depth: 1

before_build:
- nuget restore
test: off

build:
verbosity: minimal
publish_nuget: true
publish_nuget_symbols: true
build_script:
- ps: .\build.ps1

deploy:
- provider: NuGet
Expand Down
46 changes: 46 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
########################
# THE BUILD!
########################

Push-Location $PSScriptRoot
Import-Module $PSScriptRoot\Build\Autofac.Build.psd1 -Force

$artifactsPath = "$PSScriptRoot\artifacts"
$packagesPath = "$artifactsPath\packages"
$sdkVersion = (Get-Content "$PSScriptRoot\global.json" | ConvertFrom-Json).sdk.version

# Clean up artifacts folder
if (Test-Path $artifactsPath) {
Write-Message "Cleaning $artifactsPath folder"
Remove-Item $artifactsPath -Force -Recurse
}

# Install dotnet CLI
Write-Message "Installing .NET Core SDK version $sdkVersion"
Install-DotNetCli -Version $sdkVersion

# Write out dotnet information
& dotnet --info

# Set version suffix
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
$versionSuffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"]

Write-Message "Package version suffix is '$versionSuffix'"

# Package restore
Write-Message "Restoring packages"
Get-DotNetProjectDirectory -RootPath $PSScriptRoot | Restore-DependencyPackages

# Build/package
Write-Message "Building projects and packages"
Get-DotNetProjectDirectory -RootPath $PSScriptRoot\src | Invoke-DotNetPack -PackagesPath $packagesPath -VersionSuffix $versionSuffix

# Test
Write-Message "Executing unit tests"
Get-DotNetProjectDirectory -RootPath $PSScriptRoot\test | Invoke-Test

# Finished
Write-Message "Build finished"
Pop-Location
49 changes: 49 additions & 0 deletions build/Analyzers.ruleset
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Autofac Analyzer Rules" Description="Analyzer rules for Autofac assemblies." ToolsVersion="14.0">
<!-- https://github.com/dotnet/roslyn/blob/master/docs/compilers/Rule%20Set%20Format.md -->
<IncludeAll Action="Warning" />
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<!-- Prefix local calls with this -->
<Rule Id="SA1101" Action="None" />
<!-- Use built-in type alias -->
<Rule Id="SA1121" Action="None" />
<!-- Use String.Empty instead of "" -->
<Rule Id="SA1122" Action="None" />
<!-- Using statements must be inside a namespace -->
<Rule Id="SA1200" Action="None" />
<!-- Enforce order of class members by member type -->
<Rule Id="SA1201" Action="None" />
<!-- Enforce order of class members by member visibility -->
<Rule Id="SA1202" Action="None" />
<!-- Enforce order of constantand static members -->
<Rule Id="SA1203" Action="None" />
<!-- Enforce order of static vs. non-static members -->
<Rule Id="SA1204" Action="None" />
<!-- Enforce order of readonly vs. non-readonly members -->
<Rule Id="SA1214" Action="None" />
<!-- Fields can't start with underscore -->
<Rule Id="SA1309" Action="None" />
<!-- Suppressions must have a justification -->
<Rule Id="SA1404" Action="None" />
<!-- No single-line statements involving braces -->
<Rule Id="SA1501" Action="None" />
<!-- Braces must not be omitted -->
<Rule Id="SA1503" Action="None" />
<!-- Element must be documented -->
<Rule Id="SA1600" Action="None" />
<!-- Parameter documentation mus be in the right order -->
<Rule Id="SA1612" Action="None" />
<!-- Return value must be documented -->
<Rule Id="SA1615" Action="None" />
<!-- Generic type parameters must be documented -->
<Rule Id="SA1618" Action="None" />
<!-- Don't copy/paste documentation -->
<Rule Id="SA1625" Action="None" />
<!-- Exception documentation must not be empty -->
<Rule Id="SA1627" Action="None" />
<!-- File must have header -->
<Rule Id="SA1633" Action="None" />
<!-- Enable XML documentation output-->
<Rule Id="SA1652" Action="None" />
</Rules>
</RuleSet>
15 changes: 15 additions & 0 deletions build/Autofac.Build.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@{
RootModule = '.\Autofac.Build.psm1'
ModuleVersion = '0.2.0'
GUID = '55d3f738-f48f-4497-9b2c-ecd90ec1f978'
Author = 'Autofac Contributors'
CompanyName = 'Autofac'
Description = 'Build support for Autofac projects.'
FunctionsToExport = '*'
CmdletsToExport = '*'
VariablesToExport = '*'
AliasesToExport = '*'
ModuleList = @()
FileList = @()
PrivateData = ''
}
Loading