Skip to content

Commit

Permalink
Use Central Package Management.
Browse files Browse the repository at this point in the history
Use the new simplified artifact output paths.
  • Loading branch information
bgrainger committed Sep 17, 2023
1 parent f3767b4 commit 7a5993d
Show file tree
Hide file tree
Showing 24 changed files with 129 additions and 90 deletions.
8 changes: 4 additions & 4 deletions .ci/build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ steps:
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'MySqlConnector.Tests-8.0-$(Agent.OS)'
targetPath: 'tests/MySqlConnector.Tests/bin/Release/net8.0/publish'
targetPath: 'artifacts/publish/MySqlConnector.Tests/release_net8.0'

- task: DotNetCoreCLI@2
displayName: 'Publish Conformance.Tests'
Expand All @@ -45,7 +45,7 @@ steps:
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'Conformance.Tests-8.0-$(Agent.OS)'
targetPath: 'tests/Conformance.Tests/bin/Release/net8.0/publish'
targetPath: 'artifacts/publish/Conformance.Tests/release_net8.0'

- task: DotNetCoreCLI@2
displayName: 'Publish IntegrationTests (7.0)'
Expand All @@ -57,7 +57,7 @@ steps:
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'IntegrationTests-net8.0-$(Agent.OS)'
targetPath: 'tests/IntegrationTests/bin/Release/net8.0/publish'
targetPath: 'artifacts/publish/IntegrationTests/release_net8.0'

- task: DotNetCoreCLI@2
displayName: 'Publish IntegrationTests (6.0)'
Expand All @@ -69,4 +69,4 @@ steps:
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'IntegrationTests-net6.0-$(Agent.OS)'
targetPath: 'tests/IntegrationTests/bin/Release/net6.0/publish'
targetPath: 'artifacts/publish/IntegrationTests/release_net6.0'
8 changes: 4 additions & 4 deletions .ci/config/config.compression+ssl.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"Data": {
"ConnectionString": "server=127.0.0.1;user id=ssltest;password=test;port=3306;database=mysqltest;ssl mode=required;use compression=true;DefaultCommandTimeout=3600",
"SocketPath": "./../../../../../.ci/run/mysql/mysqld.sock",
"SocketPath": "./../../../../.ci/run/mysql/mysqld.sock",
"PasswordlessUser": "no_password",
"SecondaryDatabase": "testdb2",
"UnsupportedFeatures": "RsaEncryption,CachingSha2Password,Tls12,Tls13,UuidToBin",
"MySqlBulkLoaderLocalCsvFile": "../../../../TestData/LoadData_UTF8_BOM_Unix.CSV",
"MySqlBulkLoaderLocalTsvFile": "../../../../TestData/LoadData_UTF8_BOM_Unix.TSV",
"CertificatesPath": "../../../../../.ci/server/certs"
"MySqlBulkLoaderLocalCsvFile": "../../../TestData/LoadData_UTF8_BOM_Unix.CSV",
"MySqlBulkLoaderLocalTsvFile": "../../../TestData/LoadData_UTF8_BOM_Unix.TSV",
"CertificatesPath": "../../../../.ci/server/certs"
}
}
6 changes: 3 additions & 3 deletions .ci/config/config.compression.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"Data": {
"ConnectionString": "server=127.0.0.1;user id=mysqltest;password=test;port=3306;database=mysqltest;ssl mode=none;UseCompression=true;DefaultCommandTimeout=3600",
"SocketPath": "./../../../../../.ci/run/mysql/mysqld.sock",
"SocketPath": "./../../../../.ci/run/mysql/mysqld.sock",
"PasswordlessUser": "no_password",
"SecondaryDatabase": "testdb2",
"UnsupportedFeatures": "Ed25519,RsaEncryption,CachingSha2Password,QueryAttributes,Tls12,Tls13,UnixDomainSocket,UuidToBin",
"MySqlBulkLoaderLocalCsvFile": "../../../../TestData/LoadData_UTF8_BOM_Unix.CSV",
"MySqlBulkLoaderLocalTsvFile": "../../../../TestData/LoadData_UTF8_BOM_Unix.TSV"
"MySqlBulkLoaderLocalCsvFile": "../../../../tests/TestData/LoadData_UTF8_BOM_Unix.CSV",
"MySqlBulkLoaderLocalTsvFile": "../../../../tests/TestData/LoadData_UTF8_BOM_Unix.TSV"
}
}
6 changes: 3 additions & 3 deletions .ci/config/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"Data": {
"ConnectionString": "server=127.0.0.1;user id=mysqltest;password=test;port=3306;database=mysqltest;ssl mode=none;DefaultCommandTimeout=3600",
"SocketPath": "./../../../../../.ci/run/mysql/mysqld.sock",
"SocketPath": "./../../../../.ci/run/mysql/mysqld.sock",
"PasswordlessUser": "no_password",
"SecondaryDatabase": "testdb2",
"UnsupportedFeatures": "Ed25519,RsaEncryption,CachingSha2Password,QueryAttributes,Tls12,Tls13,UnixDomainSocket,UuidToBin",
"MySqlBulkLoaderLocalCsvFile": "../../../../TestData/LoadData_UTF8_BOM_Unix.CSV",
"MySqlBulkLoaderLocalTsvFile": "../../../../TestData/LoadData_UTF8_BOM_Unix.TSV"
"MySqlBulkLoaderLocalCsvFile": "../../../../tests/TestData/LoadData_UTF8_BOM_Unix.CSV",
"MySqlBulkLoaderLocalTsvFile": "../../../../tests/TestData/LoadData_UTF8_BOM_Unix.TSV"
}
}
8 changes: 4 additions & 4 deletions .ci/config/config.ssl.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"Data": {
"ConnectionString": "server=127.0.0.1;user id=ssltest;password=test;port=3306;database=mysqltest;ssl mode=required;certificate file=../../../../../.ci/server/certs/ssl-client.pfx;DefaultCommandTimeout=3600",
"SocketPath": "./../../../../../.ci/run/mysql/mysqld.sock",
"SocketPath": "./../../../../.ci/run/mysql/mysqld.sock",
"PasswordlessUser": "no_password",
"SecondaryDatabase": "testdb2",
"UnsupportedFeatures": "RsaEncryption,CachingSha2Password,Tls12,Tls13,UuidToBin",
"MySqlBulkLoaderLocalCsvFile": "../../../../TestData/LoadData_UTF8_BOM_Unix.CSV",
"MySqlBulkLoaderLocalTsvFile": "../../../../TestData/LoadData_UTF8_BOM_Unix.TSV",
"CertificatesPath": "../../../../../.ci/server/certs"
"MySqlBulkLoaderLocalCsvFile": "../../../TestData/LoadData_UTF8_BOM_Unix.CSV",
"MySqlBulkLoaderLocalTsvFile": "../../../TestData/LoadData_UTF8_BOM_Unix.TSV",
"CertificatesPath": "../../../../.ci/server/certs"
}
}
8 changes: 4 additions & 4 deletions .ci/config/config.uds+ssl.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"Data": {
"ConnectionString": "server=./../../../../../.ci/mysqld/mysqld.sock;user id=ssltest;password=test;database=mysqltest;ssl mode=required;DefaultCommandTimeout=3600",
"ConnectionString": "server=./../../../../.ci/mysqld/mysqld.sock;user id=ssltest;password=test;database=mysqltest;ssl mode=required;DefaultCommandTimeout=3600",
"PasswordlessUser": "no_password",
"SecondaryDatabase": "testdb2",
"UnsupportedFeatures": "None",
"MySqlBulkLoaderLocalCsvFile": "../../../../TestData/LoadData_UTF8_BOM_Unix.CSV",
"MySqlBulkLoaderLocalTsvFile": "../../../../TestData/LoadData_UTF8_BOM_Unix.TSV",
"CertificatesPath": "../../../../../.ci/server/certs"
"MySqlBulkLoaderLocalCsvFile": "../../../TestData/LoadData_UTF8_BOM_Unix.CSV",
"MySqlBulkLoaderLocalTsvFile": "../../../TestData/LoadData_UTF8_BOM_Unix.TSV",
"CertificatesPath": "../../../../.ci/server/certs"
}
}
6 changes: 3 additions & 3 deletions .ci/config/config.uds.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"Data": {
"ConnectionString": "server=./../../../../../.ci/run/mysql/mysqld.sock;user id=mysqltest;password=test;database=mysqltest;ssl mode=none;DefaultCommandTimeout=3600",
"ConnectionString": "server=./../../../../.ci/run/mysql/mysqld.sock;user id=mysqltest;password=test;database=mysqltest;ssl mode=none;DefaultCommandTimeout=3600",
"PasswordlessUser": "no_password",
"SecondaryDatabase": "testdb2",
"UnsupportedFeatures": "None",
"MySqlBulkLoaderLocalCsvFile": "../../../../TestData/LoadData_UTF8_BOM_Unix.CSV",
"MySqlBulkLoaderLocalTsvFile": "../../../../TestData/LoadData_UTF8_BOM_Unix.TSV"
"MySqlBulkLoaderLocalCsvFile": "../../../TestData/LoadData_UTF8_BOM_Unix.CSV",
"MySqlBulkLoaderLocalTsvFile": "../../../TestData/LoadData_UTF8_BOM_Unix.TSV"
}
}
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ dotnet_diagnostic.SA1500.severity = none # Braces for multi-line statements shou
dotnet_diagnostic.SA1503.severity = none # Braces should not be omitted.
dotnet_diagnostic.SA1513.severity = none # Closing brace should be followed by blank line.
dotnet_diagnostic.SA1516.severity = none # Elements should be separated by blank line.
dotnet_diagnostic.SA1519.severity = none # Braces should not be omitted from multi-line child statement
dotnet_diagnostic.SA1600.severity = none # Elements should be documented.
dotnet_diagnostic.SA1601.severity = none # Partial elements should be documented.
dotnet_diagnostic.SA1602.severity = none # Enumeration items should be documented.
Expand Down
22 changes: 22 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project>

<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LangVersion>preview</LangVersion>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<NoWarn>$(NoWarn);1591;CA1708;CA1835;CA2215;CA5397;NU5105;SYSLIB0039</NoWarn>
<UseArtifactsOutput>true</UseArtifactsOutput>
<NuGetAudit>true</NuGetAudit>
<NuGetAuditLevel>low</NuGetAuditLevel>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
</PropertyGroup>

<PropertyGroup Condition=" '$(GITHUB_ACTIONS)' == 'true' OR '$(APPVEYOR)' == 'True' OR '$(TF_BUILD)' == 'True' ">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<Deterministic>true</Deterministic>
</PropertyGroup>

</Project>
34 changes: 34 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
</PropertyGroup>

<ItemGroup>
<PackageVersion Include="AdoNet.Specification.Tests" Version="2.0.0-beta.1" />
<PackageVersion Include="Dapper.StrongName" Version="2.0.143" />
<PackageVersion Include="IndexRange" Version="1.0.2" />
<PackageVersion Include="log4net" Version="2.0.10" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
<PackageVersion Include="MySql.Data" Version="8.1.0" />
<PackageVersion Include="NLog" Version="4.5.0" />
<PackageVersion Include="Serilog" Version="2.6.0" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.507" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="7.0.2" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="xunit" Version="2.4.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageVersion Include="YamlDotNet" Version="13.1.1" />
</ItemGroup>

<ItemGroup>
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<GlobalPackageReference Include="MinVer" Version="4.3.0" />
</ItemGroup>

</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" protocolVersion="3" />
</packageSources>
</configuration>
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'IntegrationTests-net472-$(Agent.OS)'
targetPath: 'tests/IntegrationTests/bin/Release/net472/publish'
targetPath: 'artifacts/publish/IntegrationTests/release_net472'

- job: windows_mysql_data
displayName: 'MySql.Data Tests'
Expand Down
26 changes: 3 additions & 23 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<PropertyGroup>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<AssemblyOriginatorKeyFile>..\..\MySqlConnector.snk</AssemblyOriginatorKeyFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<PackageReleaseNotes>https://mysqlconnector.net/overview/version-history/</PackageReleaseNotes>
<PackageProjectUrl>https://mysqlconnector.net/</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -17,45 +17,25 @@
<PackageValidationBaselineVersion>2.0.0</PackageValidationBaselineVersion>
<EnableStrictModeForCompatibleFrameworksInPackageValidation>true</EnableStrictModeForCompatibleFrameworksInPackageValidation>
<EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>
<LangVersion>preview</LangVersion>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<AnalysisLevel>latest-all</AnalysisLevel>
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;CA1708;CA1835;CA2215;CA5397;NU5105;SYSLIB0039</NoWarn>
<MinVerDefaultPreReleaseIdentifiers>beta.0</MinVerDefaultPreReleaseIdentifiers>
<ArtifactsPath>$(MSBuildThisFileDirectory)..\artifacts</ArtifactsPath>
<NuGetAudit>true</NuGetAudit>
<NuGetAuditLevel>low</NuGetAuditLevel>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
</PropertyGroup>

<PropertyGroup Condition=" '$(GITHUB_ACTIONS)' == 'true' OR '$(APPVEYOR)' == 'True' OR '$(TF_BUILD)' == 'True' ">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<Deterministic>true</Deterministic>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
<PackageReference Include="MinVer" Version="4.3.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507">
<PackageReference Include="StyleCop.Analyzers">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<None Include="..\..\docs\static\img\logo.png" Pack="true" PackagePath="\"/>
<None Include="..\..\docs\static\img\logo.png" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MySqlConnector\MySqlConnector.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="docs\README.md" Pack="true" PackagePath="\"/>
<None Include="docs\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MySqlConnector\MySqlConnector.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="docs\README.md" Pack="true" PackagePath="\"/>
<None Include="docs\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NLog" Version="4.5.0" />
<PackageReference Include="NLog" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MySqlConnector\MySqlConnector.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="docs\README.md" Pack="true" PackagePath="\"/>
<None Include="docs\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Serilog" Version="2.6.0" />
<PackageReference Include="Serilog" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MySqlConnector\MySqlConnector.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="docs\README.md" Pack="true" PackagePath="\"/>
<None Include="docs\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="log4net" Version="2.0.10" />
<PackageReference Include="log4net" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MySqlConnector\MySqlConnector.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="docs\README.md" Pack="true" PackagePath="\"/>
<None Include="docs\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions src/MySqlConnector/MySqlConnector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' OR '$(TargetFramework)' == 'net471' OR '$(TargetFramework)' == 'net48' ">
Expand All @@ -25,12 +25,12 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' OR '$(TargetFramework)' == 'net471' OR '$(TargetFramework)' == 'net48' OR '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="IndexRange" Version="1.0.2" PrivateAssets="All" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="IndexRange" PrivateAssets="All" />
<PackageReference Include="System.Threading.Tasks.Extensions" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' != '.NETCoreApp' ">
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="7.0.2" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" />
</ItemGroup>

<ItemGroup>
Expand All @@ -41,7 +41,7 @@
</ItemGroup>

<ItemGroup>
<None Include="docs\README.md" Pack="true" PackagePath="\"/>
<None Include="docs\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
Loading

0 comments on commit 7a5993d

Please sign in to comment.