Skip to content

Commit

Permalink
Add SymbolPackageFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed Nov 20, 2024
1 parent 5ab2f17 commit 65b5e15
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 105 deletions.
208 changes: 105 additions & 103 deletions Build/.nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,65 +1,71 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
"Host": {
"type": "string",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"ExecutableTarget": {
"type": "string",
"enum": [
"Build",
"Clean",
"Compile",
"CompileExample",
"GitPreRelease",
"GitRelease",
"Pack",
"PrePack",
"Release",
"ShowGitVersion",
"Sign",
"Test"
]
},
"Verbosity": {
"type": "string",
"description": "",
"enum": [
"Verbose",
"Normal",
"Minimal",
"Quiet"
]
},
"NukeBuild": {
"properties": {
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"Folder": {
"type": "string"
},
"GitHubToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"MainName": {
"type": "string"
},
"Name": {
"type": "string"
"$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
},
"NugetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"NugetApiUrl": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Partition": {
"type": "string",
"description": "Partition to use on CI"
Expand All @@ -68,15 +74,64 @@
"type": "boolean",
"description": "Shows the execution plan (HTML)"
},
"PreReleaseFilter": {
"Profile": {
"type": "array",
"description": "Defines the profiles to load",
"items": {
"type": "string"
}
},
"Profile": {
"Root": {
"type": "string",
"description": "Root directory during build execution"
},
"Skip": {
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"$ref": "#/definitions/ExecutableTarget"
}
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
"description": "Logging verbosity during build execution. Default is 'Normal'",
"$ref": "#/definitions/Verbosity"
}
}
}
},
"allOf": [
{
"properties": {
"Folder": {
"type": "string"
},
"GitHubToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"MainName": {
"type": "string"
},
"Name": {
"type": "string"
},
"NugetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"NugetApiUrl": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"PreReleaseFilter": {
"type": "array",
"description": "Defines the profiles to load",
"items": {
"type": "string"
}
Expand All @@ -90,10 +145,6 @@
"ReleaseNameVersion": {
"type": "boolean"
},
"Root": {
"type": "string",
"description": "Root directory during build execution"
},
"SignFile": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
Expand All @@ -102,52 +153,10 @@
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Skip": {
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"Build",
"Clean",
"Compile",
"CompileExample",
"GitPreRelease",
"GitRelease",
"Pack",
"PrePack",
"Release",
"ShowGitVersion",
"Sign",
"Test"
]
}
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"Build",
"Clean",
"Compile",
"CompileExample",
"GitPreRelease",
"GitRelease",
"Pack",
"PrePack",
"Release",
"ShowGitVersion",
"Sign",
"Test"
]
}
},
"TestProjectName": {
"type": "string"
},
Expand All @@ -156,18 +165,11 @@
},
"UnlistNuget": {
"type": "boolean"
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
]
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
}
]
}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Update
- Update `Nuke.Common` to `8.1.4`.
- Update `FileSystemTasks.CopyDirectoryRecursively` to `AbsolutePathExtensions.CopyToDirectory`.
- Add `SymbolPackageFormat` and `IncludeSymbols` in the package.
- Update release `*.nupkg` to `*.*nupkg` to copy symbol package format. (Fix: #75)

## [1.8.1] / 2024-05-13
### Updated
Expand Down
2 changes: 1 addition & 1 deletion ricaun.Nuke/Components/IHazExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void BuildProjectsAndRelease(IEnumerable<Project> projects, bool releaseP

if (releasePackages)
{
Globbing.GlobFiles(exampleDirectory, "**/*.nupkg")
Globbing.GlobFiles(exampleDirectory, "**/*.*nupkg")
.ForEach(file =>
{
Serilog.Log.Information($"Copy nupkg: {file} to {ReleaseDirectory}");
Expand Down
2 changes: 1 addition & 1 deletion ricaun.Nuke/Components/IRelease.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void ReleaseProject(Project project)
var fileNameVersion = GetReleaseFileNameVersion(project.Name, version);
var ProjectDirectory = ReleaseDirectory / fileNameVersion;

var nupkgs = Globbing.GlobFiles(ContentDirectory, "**/*.nupkg");
var nupkgs = Globbing.GlobFiles(ContentDirectory, "**/*.*nupkg");
if (nupkgs.Count > 0)
{
nupkgs.ForEach(file => AbsolutePathExtensions.CopyToDirectory(file, ProjectDirectory));
Expand Down
2 changes: 2 additions & 0 deletions ricaun.Nuke/ricaun.Nuke.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

<PropertyGroup Condition="!$(Configuration.Contains('Debug'))">
<DocumentationFile>bin\Release\$(AssemblyName).xml</DocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 65b5e15

Please sign in to comment.