Skip to content

Commit

Permalink
Merge pull request #40 from sharwell/unstable-package
Browse files Browse the repository at this point in the history
Create an Unstable package with a stable version
  • Loading branch information
sharwell authored Sep 18, 2018
2 parents 59ce55b + 2a06d84 commit f92f58c
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<RootNamespace>DocumentationAnalyzers</RootNamespace>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IncludeSymbols>true</IncludeSymbols>
<NuspecFile>DocumentationAnalyzers.nuspec</NuspecFile>
<NuspecFile Condition="'$(MetadataPackage)' != 'true'">DocumentationAnalyzers.nuspec</NuspecFile>
<NuspecFile Condition="'$(MetadataPackage)' == 'true'">DocumentationAnalyzers.Metadata.nuspec</NuspecFile>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -49,7 +50,32 @@

<Target Name="SetNuspecProperties" AfterTargets="GetBuildVersion">
<PropertyGroup>
<NuspecProperties>configuration=$(Configuration);version=$(PackageVersion)</NuspecProperties>
<BaseNuspecId>DotNetAnalyzers.DocumentationAnalyzers</BaseNuspecId>
<ImplementationNuspecId>$(BaseNuspecId)</ImplementationNuspecId>
<MetadataNuspecId>$(BaseNuspecId)</MetadataNuspecId>

<ImplementationNuspecId Condition="'$(PrereleaseVersion)' != ''">$(BaseNuspecId).Unstable</ImplementationNuspecId>
<MetadataNuspecId Condition="'$(PrereleaseVersion)' == ''">$(BaseNuspecId).Unstable</MetadataNuspecId>

<NuspecId Condition="'$(MetadataPackage)' != 'true'">$(ImplementationNuspecId)</NuspecId>
<NuspecId Condition="'$(MetadataPackage)' == 'true'">$(MetadataNuspecId)</NuspecId>

<NuspecUnstableVersion>$(AssemblyVersion)</NuspecUnstableVersion>
<NuspecStableVersion>$(PackageVersion)</NuspecStableVersion>

<NuspecVersion Condition="'$(MetadataPackage)' != 'true'">$(NuspecUnstableVersion)</NuspecVersion>
<NuspecVersion Condition="'$(MetadataPackage)' == 'true'">$(NuspecStableVersion)</NuspecVersion>

<ImplementationNuspecVersion Condition="'$(PrereleaseVersion)' != ''">$(NuspecUnstableVersion)</ImplementationNuspecVersion>
<ImplementationNuspecVersion Condition="'$(PrereleaseVersion)' == ''">$(NuspecStableVersion)</ImplementationNuspecVersion>

<NuspecProperties>id=$(NuspecId);configuration=$(Configuration);GitCommitIdShort=$(GitCommitIdShort);version=$(NuspecVersion);implId=$(ImplementationNuspecId);implVersion=$(ImplementationNuspecVersion)</NuspecProperties>
</PropertyGroup>
</Target>

<Target Name="PackMetadata" AfterTargets="Pack" Condition="'$(MetadataPackage)' != 'true'">
<MSBuild Projects="$(MSBuildProjectFullPath)"
Targets="Pack"
Properties="MetadataPackage=true;IncludeSymbols=false" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<package>
<metadata minClientVersion="2.7">
<id>$id$</id>
<version>0.0.0</version>
<title>$id$</title>
<authors>Sam Harwell et. al.</authors>
<owners>Sam Harwell</owners>
<licenseUrl>https://raw.githubusercontent.com/DotNetAnalyzers/DocumentationAnalyzers/$GitCommitIdShort$/LICENSE</licenseUrl>
<projectUrl>https://github.com/DotNetAnalyzers/DocumentationAnalyzers</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>An implementation of .NET documentation rules using Roslyn analyzers and code fixes</description>
<releaseNotes>https://github.com/DotNetAnalyzers/DocumentationAnalyzers/releases/$version$</releaseNotes>
<copyright>Copyright 2018 Tunnel Vision Laboratories, LLC</copyright>
<tags>Documentation DotNetAnalyzers Roslyn Diagnostic Analyzer</tags>
<developmentDependency>true</developmentDependency>
<dependencies>
<dependency id="$implId$" version="$implVersion$"/>
</dependencies>
</metadata>
<files>

<!-- Additional Files -->
<file src="..\..\LICENSE" />
<file src="..\..\THIRD-PARTY-NOTICES.txt" />

</files>
</package>
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0"?>
<package>
<metadata minClientVersion="2.7">
<id>DotNetAnalyzers.DocumentationAnalyzers</id>
<id>$id$</id>
<version>0.0.0</version>
<title>DotNetAnalyzers.DocumentationAnalyzers</title>
<title>$id$</title>
<authors>Sam Harwell et. al.</authors>
<owners>Sam Harwell</owners>
<licenseUrl>https://raw.githubusercontent.com/DotNetAnalyzers/DocumentationAnalyzers/$version$/LICENSE</licenseUrl>
<licenseUrl>https://raw.githubusercontent.com/DotNetAnalyzers/DocumentationAnalyzers/$GitCommitIdShort$/LICENSE</licenseUrl>
<projectUrl>https://github.com/DotNetAnalyzers/DocumentationAnalyzers</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>An implementation of .NET documentation rules using Roslyn analyzers and code fixes</description>
Expand All @@ -17,6 +17,10 @@
</metadata>
<files>

<!-- Additional Files -->
<file src="..\..\LICENSE" />
<file src="..\..\THIRD-PARTY-NOTICES.txt" />

<!-- Binaries and symbols -->
<file src="bin\$Configuration$\netstandard1.1\DocumentationAnalyzers.dll" target="analyzers\dotnet\cs" />
<file src="bin\$Configuration$\netstandard1.1\**\DocumentationAnalyzers.resources.dll" target="analyzers\dotnet\cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

<PropertyGroup>
<TargetFrameworks>netstandard1.1;net452</TargetFrameworks>
<PackageId>DocumentationAnalyzers.NewIdRequiredDueToNuGetBug</PackageId>
</PropertyGroup>

<Choose>
Expand Down
9 changes: 0 additions & 9 deletions build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ if (!(Test-Path $SolutionPath)) {
exit 1
}

. .\version.ps1

If ($Debug) {
$BuildConfig = 'Debug'
} Else {
Expand Down Expand Up @@ -108,10 +106,3 @@ if (-not $SkipKeyCheck) {
}
}
}

if (-not (Test-Path 'nuget')) {
mkdir "nuget"
}

Copy-Item "..\DocumentationAnalyzers\DocumentationAnalyzers.CodeFixes\bin\$BuildConfig\DocumentationAnalyzers.$Version.nupkg" 'nuget'
Copy-Item "..\DocumentationAnalyzers\DocumentationAnalyzers.CodeFixes\bin\$BuildConfig\DocumentationAnalyzers.$Version.symbols.nupkg" 'nuget'
8 changes: 0 additions & 8 deletions build/push.ps1

This file was deleted.

1 change: 0 additions & 1 deletion build/version.ps1

This file was deleted.

0 comments on commit f92f58c

Please sign in to comment.