Skip to content

Commit 2a396f5

Browse files
committed
Create an Unstable package with a stable version
1 parent d57bfe5 commit 2a396f5

3 files changed

Lines changed: 73 additions & 4 deletions

File tree

DocumentationAnalyzers/DocumentationAnalyzers.CodeFixes/DocumentationAnalyzers.CodeFixes.csproj

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
<RootNamespace>DocumentationAnalyzers</RootNamespace>
88
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
99
<IncludeSymbols>true</IncludeSymbols>
10-
<NuspecFile>DocumentationAnalyzers.nuspec</NuspecFile>
10+
<NuspecFile Condition="'$(MetadataPackage)' != 'true'">DocumentationAnalyzers.nuspec</NuspecFile>
11+
<NuspecFile Condition="'$(MetadataPackage)' == 'true'">DocumentationAnalyzers.Metadata.nuspec</NuspecFile>
1112
</PropertyGroup>
1213

1314
<PropertyGroup>
@@ -49,7 +50,32 @@
4950

5051
<Target Name="SetNuspecProperties" AfterTargets="GetBuildVersion">
5152
<PropertyGroup>
52-
<NuspecProperties>configuration=$(Configuration);version=$(PackageVersion)</NuspecProperties>
53+
<BaseNuspecId>DotNetAnalyzers.DocumentationAnalyzers</BaseNuspecId>
54+
<ImplementationNuspecId>$(BaseNuspecId)</ImplementationNuspecId>
55+
<MetadataNuspecId>$(BaseNuspecId)</MetadataNuspecId>
56+
57+
<ImplementationNuspecId Condition="'$(PrereleaseVersion)' != ''">$(BaseNuspecId).Unstable</ImplementationNuspecId>
58+
<MetadataNuspecId Condition="'$(PrereleaseVersion)' == ''">$(BaseNuspecId).Unstable</MetadataNuspecId>
59+
60+
<NuspecId Condition="'$(MetadataPackage)' != 'true'">$(ImplementationNuspecId)</NuspecId>
61+
<NuspecId Condition="'$(MetadataPackage)' == 'true'">$(MetadataNuspecId)</NuspecId>
62+
63+
<NuspecUnstableVersion>$(AssemblyVersion)</NuspecUnstableVersion>
64+
<NuspecStableVersion>$(PackageVersion)</NuspecStableVersion>
65+
66+
<NuspecVersion Condition="'$(MetadataPackage)' != 'true'">$(NuspecUnstableVersion)</NuspecVersion>
67+
<NuspecVersion Condition="'$(MetadataPackage)' == 'true'">$(NuspecStableVersion)</NuspecVersion>
68+
69+
<ImplementationNuspecVersion Condition="'$(PrereleaseVersion)' != ''">$(NuspecUnstableVersion)</ImplementationNuspecVersion>
70+
<ImplementationNuspecVersion Condition="'$(PrereleaseVersion)' == ''">$(NuspecStableVersion)</ImplementationNuspecVersion>
71+
72+
<NuspecProperties>id=$(NuspecId);configuration=$(Configuration);version=$(NuspecVersion);implId=$(ImplementationNuspecId);implVersion=$(ImplementationNuspecVersion)</NuspecProperties>
5373
</PropertyGroup>
5474
</Target>
75+
76+
<Target Name="PackMetadata" AfterTargets="Pack" Condition="'$(MetadataPackage)' != 'true'">
77+
<MSBuild Projects="$(MSBuildProjectFullPath)"
78+
Targets="Pack"
79+
Properties="MetadataPackage=true;IncludeSymbols=false" />
80+
</Target>
5581
</Project>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0"?>
2+
<package>
3+
<metadata minClientVersion="2.7">
4+
<id>$id$</id>
5+
<version>0.0.0</version>
6+
<title>$id$</title>
7+
<authors>Sam Harwell et. al.</authors>
8+
<owners>Sam Harwell</owners>
9+
<licenseUrl>https://raw.githubusercontent.com/DotNetAnalyzers/DocumentationAnalyzers/$version$/LICENSE</licenseUrl>
10+
<projectUrl>https://github.com/DotNetAnalyzers/DocumentationAnalyzers</projectUrl>
11+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12+
<description>An implementation of .NET documentation rules using Roslyn analyzers and code fixes</description>
13+
<releaseNotes>https://github.com/DotNetAnalyzers/DocumentationAnalyzers/releases/$version$</releaseNotes>
14+
<copyright>Copyright 2018 Tunnel Vision Laboratories, LLC</copyright>
15+
<tags>Documentation DotNetAnalyzers Roslyn Diagnostic Analyzer</tags>
16+
<developmentDependency>true</developmentDependency>
17+
<dependencies>
18+
<dependency id="$implId$" version="$implVersion$"/>
19+
</dependencies>
20+
</metadata>
21+
<files>
22+
23+
<!-- Binaries and symbols -->
24+
<file src="bin\$Configuration$\netstandard1.1\DocumentationAnalyzers.dll" target="analyzers\dotnet\cs" />
25+
<file src="bin\$Configuration$\netstandard1.1\**\DocumentationAnalyzers.resources.dll" target="analyzers\dotnet\cs" />
26+
<file src="bin\$Configuration$\netstandard1.1\DocumentationAnalyzers.pdb" target="analyzers\dotnet\cs" />
27+
<file src="bin\$Configuration$\netstandard1.1\DocumentationAnalyzers.CodeFixes.dll" target="analyzers\dotnet\cs" />
28+
<file src="bin\$Configuration$\netstandard1.1\**\DocumentationAnalyzers.CodeFixes.resources.dll" target="analyzers\dotnet\cs" />
29+
<file src="bin\$Configuration$\netstandard1.1\DocumentationAnalyzers.CodeFixes.pdb" target="analyzers\dotnet\cs" />
30+
31+
<!-- Dependencies -->
32+
<file src="bin\$Configuration$\netstandard1.1\CommonMark.dll" target="analyzers\dotnet\cs" />
33+
34+
<!-- Scripts -->
35+
<file src="tools\install.ps1" target="tools\" />
36+
<file src="tools\uninstall.ps1" target="tools\" />
37+
38+
<!-- Source code -->
39+
<file src="..\DocumentationAnalyzers\**\*.cs" exclude="..\DocumentationAnalyzers\obj\**\*.cs" target="src"/>
40+
<file src="**\*.cs" exclude="obj\**\*.cs;Properties\AssemblyInfo.cs" target="src"/>
41+
42+
</files>
43+
</package>

DocumentationAnalyzers/DocumentationAnalyzers.CodeFixes/DocumentationAnalyzers.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0"?>
22
<package>
33
<metadata minClientVersion="2.7">
4-
<id>DotNetAnalyzers.DocumentationAnalyzers</id>
4+
<id>$id$</id>
55
<version>0.0.0</version>
6-
<title>DotNetAnalyzers.DocumentationAnalyzers</title>
6+
<title>$id$</title>
77
<authors>Sam Harwell et. al.</authors>
88
<owners>Sam Harwell</owners>
99
<licenseUrl>https://raw.githubusercontent.com/DotNetAnalyzers/DocumentationAnalyzers/$version$/LICENSE</licenseUrl>

0 commit comments

Comments
 (0)