Skip to content

Commit

Permalink
fix(dotnet): use snupkg format for dotnet symbol packages (#830)
Browse files Browse the repository at this point in the history
The legacy format is not supported by NuGet's own symbols server, and the
SymbolSource server is currently experiencing a certificate expiration event,
which seems to be a somewhat recurring issue (NuGet/Home#6082).

More info: https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg
  • Loading branch information
RomainMuller authored and mergify[bot] committed Sep 30, 2019
1 parent 09a7c0d commit 0d18b4d
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 7 deletions.
4 changes: 1 addition & 3 deletions packages/jsii-build-tools/bin/package-dotnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
set -euo pipefail
rm -fr dist/dotnet
mkdir -p dist/dotnet
cp *.nupkg dist/dotnet


cp *.nupkg *.snupkg dist/dotnet
1 change: 1 addition & 0 deletions packages/jsii-dotnet-analyzers/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ coverage/


*.nupkg
*.snupkg
bin/
cli/
obj/
Expand Down
1 change: 1 addition & 0 deletions packages/jsii-dotnet-analyzers/NuGet.Metadata.props.t.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ process.stdout.write(`<Project>
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<IncludeSource>True</IncludeSource>
<PackageOutputPath>..\\..\\bin\\$(Configuration)\\NuGet\\</PackageOutputPath>
<PackageVersion>$(JsiiVersion)</PackageVersion>
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-dotnet-analyzers/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -euo pipefail

dotnet build --force -c Release ./src/Amazon.JSII.Analyzers

cp -f ./bin/Release/NuGet/*.nupkg .
cp -f ./bin/Release/NuGet/*.nupkg ./bin/Release/NuGet/*.snupkg .
3 changes: 2 additions & 1 deletion packages/jsii-dotnet-jsonmodel/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ node_modules/
coverage/

*.nupkg
*.snupkg
bin/
cli/
obj/
obj/
1 change: 1 addition & 0 deletions packages/jsii-dotnet-jsonmodel/NuGet.Metadata.props.t.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ process.stdout.write(`<Project>
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<IncludeSource>True</IncludeSource>
<PackageOutputPath>..\\..\\bin\\$(Configuration)\\NuGet\\</PackageOutputPath>
<PackageVersion>$(JsiiVersion)</PackageVersion>
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-dotnet-jsonmodel/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ npm run gen

dotnet build --force -c Release ./src/Amazon.JSII.JsonModel.sln

cp -f ./bin/Release/NuGet/*.nupkg .
cp -f ./bin/Release/NuGet/*.nupkg ./bin/Release/NuGet/*.snupkg .
1 change: 1 addition & 0 deletions packages/jsii-dotnet-runtime/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ coverage/


*.nupkg
*.snupkg
bin/
cli/
obj/
Expand Down
1 change: 1 addition & 0 deletions packages/jsii-dotnet-runtime/NuGet.Metadata.props.t.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ process.stdout.write(`<Project>
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<IncludeSource>True</IncludeSource>
<PackageOutputPath>..\\..\\bin\\$(Configuration)\\NuGet\\</PackageOutputPath>
<PackageVersion>$(JsiiVersion)</PackageVersion>
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-dotnet-runtime/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ rsync -av node_modules/jsii-runtime/webpack/ ${bundle_dir}
# built before the calc packages are generated.
dotnet build --force -c Release ./src/Amazon.JSII.Runtime

cp -f ./bin/Release/NuGet/*.nupkg .
cp -f ./bin/Release/NuGet/*.nupkg ./bin/Release/NuGet/*.snupkg .
1 change: 1 addition & 0 deletions packages/jsii-pacmak/lib/targets/dotnet/filegenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export class FileGenerator {
propertyGroup.ele('GeneratePackageOnBuild', 'true');
propertyGroup.ele('GenerateDocumentationFile', 'true');
propertyGroup.ele('IncludeSymbols', 'true');
propertyGroup.ele('SymbolPackageFormat', 'snupkg');
propertyGroup.ele('IncludeSource', 'true');
propertyGroup.ele('PackageVersion', this.getDecoratedVersion(assembly));
propertyGroup.ele('PackageId', packageId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<IncludeSource>true</IncludeSource>
<PackageVersion>0.17.0</PackageVersion>
<PackageId>Amazon.JSII.Tests.CalculatorPackageId.BasePackageId</PackageId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<IncludeSource>true</IncludeSource>
<PackageVersion>0.17.0-devpreview</PackageVersion>
<PackageId>Amazon.JSII.Tests.CalculatorPackageId.LibPackageId</PackageId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<IncludeSource>true</IncludeSource>
<PackageVersion>0.17.0</PackageVersion>
<PackageId>Amazon.JSII.Tests.CalculatorPackageId</PackageId>
Expand Down

0 comments on commit 0d18b4d

Please sign in to comment.