Skip to content

Commit 935444a

Browse files
Update build (Central Package Management, versioning, restructure projects)
1 parent 24f8c26 commit 935444a

30 files changed

+127
-23
lines changed

Directory.Build.props

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,53 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4-
<TargetFramework>net452</TargetFramework>
4+
<TargetFramework>net45</TargetFramework>
55
<Company>Umbraco HQ</Company>
66
<Authors>Umbraco</Authors>
77
<Copyright>Copyright © Umbraco $([System.DateTime]::Today.ToString('yyyy'))</Copyright>
88
<Product>Umbraco Deploy Contrib</Product>
99
<PackageProjectUrl>https://github.com/umbraco/Umbraco.Deploy.Contrib</PackageProjectUrl>
10+
<PackageIconUrl>https://umbraco.com/dist/nuget/logo-small.png</PackageIconUrl>
11+
<PackageIcon>icon.png</PackageIcon>
1012
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1113
<PackageTags>umbraco deploy contrib</PackageTags>
1214
<NeutralLanguage>en-US</NeutralLanguage>
1315
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1416
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
1517
</PropertyGroup>
16-
17-
<ItemGroup>
18-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
19-
</ItemGroup>
20-
18+
2119
<!-- SourceLink -->
2220
<PropertyGroup>
2321
<PublishRepositoryUrl>true</PublishRepositoryUrl>
24-
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2522
<IncludeSymbols>true</IncludeSymbols>
2623
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2724
</PropertyGroup>
25+
26+
<!-- Package Validation -->
27+
<PropertyGroup>
28+
<GenerateCompatibilitySuppressionFile>false</GenerateCompatibilitySuppressionFile>
29+
<EnablePackageValidation>true</EnablePackageValidation>
30+
<PackageValidationBaselineVersion>2.0.0</PackageValidationBaselineVersion>
31+
<EnableStrictModeForCompatibleFrameworksInPackage>true</EnableStrictModeForCompatibleFrameworksInPackage>
32+
<EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>
33+
</PropertyGroup>
34+
35+
<!-- Calculate version only once for the whole repository -->
36+
<PropertyGroup>
37+
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
38+
</PropertyGroup>
39+
40+
<!-- Include icon in generated NuGet packages -->
2841
<ItemGroup>
29-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
42+
<Content Include="$(MSBuildThisFileDirectory)icon.png" Pack="true" PackagePath="" Visible="false" />
3043
</ItemGroup>
44+
45+
<!-- Use version range on project references (to limit on major version in generated packages) -->
46+
<Target Name="_GetProjectReferenceVersionRanges" AfterTargets="_GetProjectReferenceVersions">
47+
<ItemGroup>
48+
<_ProjectReferencesWithVersions Condition="'%(ProjectVersion)' != ''">
49+
<ProjectVersion>[%(ProjectVersion), $([MSBuild]::Add($([System.Text.RegularExpressions.Regex]::Match('%(ProjectVersion)', '^\d+').Value), 1)))</ProjectVersion>
50+
</_ProjectReferencesWithVersions>
51+
</ItemGroup>
52+
</Target>
3153
</Project>

Directory.Packages.props

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<PropertyGroup>
4+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
</PropertyGroup>
6+
<!-- Global packages (private, build-time packages for all projects) -->
7+
<ItemGroup>
8+
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" />
9+
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" />
10+
<GlobalPackageReference Include="Umbraco.Code" Version="2.1.0" />
11+
<GlobalPackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.2.0" />
12+
</ItemGroup>
13+
<!-- Umbraco packages -->
14+
<ItemGroup>
15+
<PackageVersion Include="UmbracoCms.Core" Version="[7.6.4, 8)" />
16+
<PackageVersion Include="UmbracoDeploy" Version="[1.0.17, 4)" />
17+
</ItemGroup>
18+
</Project>

Umbraco.Deploy.Contrib.sln

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.8.34330.188
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Deploy.Contrib.Connectors", "src\Umbraco.Deploy.Contrib.Connectors\Umbraco.Deploy.Contrib.Connectors.csproj", "{42FB2213-0815-41CD-94F8-DFB0EC1D8061}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Deploy.Contrib", "src\Umbraco.Deploy.Contrib\Umbraco.Deploy.Contrib.csproj", "{42FB2213-0815-41CD-94F8-DFB0EC1D8061}"
77
EndProject
88
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Deploy.Contrib.Tests", "tests\Umbraco.Deploy.Contrib.Tests\Umbraco.Deploy.Contrib.Tests.csproj", "{48B09241-9C44-47EF-B4DF-397B39A631DC}"
99
EndProject
@@ -15,9 +15,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1515
.globalconfig = .globalconfig
1616
CONTRIBUTING.md = CONTRIBUTING.md
1717
Directory.Build.props = Directory.Build.props
18+
Directory.Packages.props = Directory.Packages.props
19+
global.json = global.json
20+
icon.png = icon.png
1821
LICENSE.md = LICENSE.md
1922
nuget.config = nuget.config
2023
README.md = README.md
24+
version.json = version.json
2125
EndProjectSection
2226
EndProject
2327
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Deploy.Contrib.Export", "src\Umbraco.Deploy.Contrib.Export\Umbraco.Deploy.Contrib.Export.csproj", "{60AF13D9-3576-4E8C-8111-090D28DFBF60}"
@@ -27,6 +31,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{71D68BC9
2731
tests\.editorconfig = tests\.editorconfig
2832
tests\codeanalysis.ruleset = tests\codeanalysis.ruleset
2933
tests\Directory.Build.props = tests\Directory.Build.props
34+
tests\Directory.Packages.props = tests\Directory.Packages.props
3035
EndProjectSection
3136
EndProject
3237
Global

global.json

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

icon.png

1.97 KB
Loading

nuget.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44
<clear />
55
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
66
<add key="Umbraco Cloud" value="https://www.myget.org/F/uaas/api/v3/index.json" />
7+
<add key="Umbraco Prereleases" value="https://www.myget.org/F/umbracoprereleases/api/v3/index.json" />
8+
<add key="Umbraco Nightly" value="https://www.myget.org/F/umbraconightly/api/v3/index.json" />
79
</packageSources>
810
</configuration>
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<PackageId>UmbracoDeploy.Contrib.Export</PackageId>
4-
<Version>2.0.0</Version>
4+
<Title>Umbraco Deploy - Contrib - Export</Title>
55
<Description>Umbraco Deploy Community Contributions for exporting schema and content to a ZIP archive.</Description>
6+
<AssemblyName>Umbraco.Deploy.Contrib.Export</AssemblyName>
7+
<RootNamespace>Umbraco.Deploy.Contrib.Export</RootNamespace>
8+
<!-- TODO: Enable when final version is shipped (because there's currently no previous version) -->
9+
<EnablePackageValidation>false</EnablePackageValidation>
610
</PropertyGroup>
11+
712
<ItemGroup>
8-
<PackageReference Include="UmbracoCms.Core" Version="7.6.4" />
9-
<PackageReference Include="UmbracoDeploy" Version="1.0.17" />
13+
<PackageReference Include="UmbracoCms.Core" />
14+
<PackageReference Include="UmbracoDeploy" />
1015
</ItemGroup>
16+
1117
<ItemGroup>
12-
<ProjectReference Include="..\Umbraco.Deploy.Contrib.Connectors\Umbraco.Deploy.Contrib.Connectors.csproj" />
18+
<ProjectReference Include="..\Umbraco.Deploy.Contrib\Umbraco.Deploy.Contrib.csproj" />
1319
</ItemGroup>
1420
</Project>

0 commit comments

Comments
 (0)