Commit 46eb300
authored
Migrate build tool from nuke build to cake build cause nuke build seems to be discontinued (#70)
* Add Cake.Frosting-based build utilities for streamlined task management
- Introduced `BuildContext` for managing solution, Git root, and executed tasks.
- Added foundational task templates (`BuildTask`, `CleanTask`, `RestoreTask`, etc.) and default implementations.
- Included CakeHost extensions for task registration and setup.
- Created sample project demonstrating the usage of custom tasks.
- Updated solution file to include new `CakeBuild` projects and samples.
* Add support for solution file auto-detection, build configuration, and context initialization improvements
- Renamed `CleanTask` to properly align task names with functionality.
- Enhanced `BuildContext` to include solution file auto-detection, default build configuration, and Git version integration.
- Simplified `BuildTask` templates and adjusted configuration handling.
- Updated `CakeHost` sample with task registration and streamlined workflow.
- Refactored project files for consistent dependencies and task integration.
* Update `CakeContextExtensions` to include exception variable in catch block for improved diagnostics, and refine `GitVersion.yml` configuration
- Replace `tag` with `label` for branch definitions.
- Adjust formatting for improved YAML readability.
* Simplify `GitVersion.yml` by removing unused branch configurations and redundant properties.
* Update `GitVersion.yml` configuration for enhanced semantic versioning
- Added `tag-prefix` and `semantic-version-format` properties for improved version tagging.
- Simplified branch definitions by removing unused branches (`develop`, `support`, `hotfix`).
- Adjusted `pull-request` label from `PullRequest` to `PR`.
* Enhance `CleanTask` to clean solution builds
- Implement `RunAsync` method, invoking `DotNetClean` and deleting `bin`/`obj` directories.
- Introduce private `DeleteDirectories` method to simplify directory cleanup logic with glob patterns and logging.
* Add missing `using` directives for `System.Linq` and `System.Threading.Tasks` in `CleanTask`
* Add `HasExecutedTask` method to `BuildContext` and integrate with `BuildTask` for conditional `NoRestore` handling
* Add missing `using System.Threading.Tasks` directive in `BuildTask`
* Add missing `using System.Threading.Tasks` directive in `RestoreTask`
* Log `NoRestore` setting in `BuildTask` for enhanced diagnostics when skipping restores
* Add settings interfaces for task templates and refactor `BuildContext`
- Introduce settings interfaces for task templates (`ICleanTaskSettings`, `ITestTaskSettings`, etc.).
- Refactor `BuildContext` to enhance modularity and reuse of Git root path logic.
- Add `UseBuildSetup` integration to `CakeHost` for streamlined build setup logic.
* - Fix null reference in `IBuildPaths` by removing redundant `this` qualifier
- Update `GitVersion.Tool` to version `6.5.1` in build project dependencies
* Update GitHub Actions workflow: bump `actions/checkout` to v5 and adjust deploy step
- Upgraded `actions/checkout` to version 5 for compatibility.
- Commented out caching and artifact upload steps.
- Modified the `DeployNuGet` step to run a specific build command within the `CakeBuildSample` directory.
* Comment out Windows and macOS jobs in GitHub Actions workflow and remove redundant configuration in solution file.
* Add `CakeTaskSettings` attribute for task settings interfaces and enhance `CakeHost` with settings support
- Introduced `[CakeTaskSettings]` attribute to annotate task settings interfaces.
- Refactored `CakeHost.UseBuildSetup` to inject and register task-specific settings interfaces.
- Added missing `using` directives and improved modularity in task setup.
* Set terminal environment variables in GitHub Actions for improved console output rendering
* Add task setup and teardown for better grouping in Cake Frosting builds
- Introduced `SomeTaskSetup` and `SomeTaskTeardown` to handle task-specific logic.
- Integrated GitHub Actions group commands for improved build log readability.
* Refactor `CleanTask` to reorder `DotNetClean` after directory deletions
* Add information logging to task setup in `SomeTaskSetup`
* Refactor `CakeHost` to simplify task setup and integrate build server functionality
- Added `SetupHost`, `AddDefaultTasks`, and `AddBuildServerIntegration` extension methods to streamline configuration.
- Replaced custom task setup and teardown (`SomeTaskSetup` and `SomeTaskTeardown`) with reusable GitHub Actions integrations (`StartGroupTaskSetup` and `EndGroupTaskTeardown`).
- Updated `CakeBuildSample` to utilize new streamlined APIs.
* Fix typo in `Ensure.cs` and add `ICakeHostBuilder` implementation for streamlined Cake build setup
- Corrected `UnkownParamName` to `UnknownParamName` across all methods in `Ensure.cs`.
- Introduced `ICakeHostBuilder` interface and its implementation, `CakeHostBuilder`, for simplifying Cake build configuration.
- Updated `CakeHostExtensions` and `CakeBuildSample` to leverage the new `CakeHostBuilder`.
* Clean up unused and redundant package references in Blazor and TokenAuthApi projects
* Refactor build context and task settings for enhanced modularity and flexibility
- Removed redundant interfaces (`IDefaultBuildSetup`, `IBuildPaths`, `ICakeBuildSettings`, etc.).
- Introduced `IBuildContext` and `IBuildContextAccessor` to centralize build context management.
- Updated `CleanTask` and `BuildTask` to leverage `ICleanTaskSettings`, improving task-specific configuration.
- Refactored `BuildContext` to streamline directory and configuration management.
- Simplified sample project setup using the new `SampleBuildContext`.
* Add implementation for `TestTask` to execute `DotNetTest` with configurable settings and enhance `BuildTask` syntax consistency
* Update integration workflow to run tests instead of build in `DeployNuGet` step
* Refactor `FrostingTaskBase` and derived tasks to streamline task execution and enhance GitHub Actions integration
- Introduced `RunAsyncCore` as a protected abstract method in `FrostingTaskBase`, replacing `RunAsync` in derived tasks.
- Added GitHub Actions group logging for better task execution visibility.
- Updated all template tasks to implement `RunAsyncCore` with appropriate logic or placeholders.
* Remove `AddBuildServerIntegration` from `CakeBuildSample` for simplification
* Annotate `FrostingTaskBase` with [PublicAPI] and update logging in task teardown for consistency
* Comment out GitHub Actions group logging in `FrostingTaskBase` and add `AddBuildServerIntegration` to `CakeBuildSample`.
* Refactor and update task settings and implementations for improved modularity and consistency
- Changed `ICleanTaskSettings.DefaultDirectoriesToClean` to method `GetDefaultDirectoriesToClean` for better clarity and extensibility.
- Introduced `TestProjects` property in `ITestTaskSettings`.
- Removed commented GitHub Actions group logging from `FrostingTaskBase` for cleanup.
- Streamlined `SampleBuildContext` to use updated `ICleanTaskSettings` API.
* Annotate interfaces with [PublicAPI], refactor exception handling in CakeContextExtensions, enhance `ITestTaskSettings`, and update task implementations for improved modularity
* Annotate `TestTask` with [PublicAPI] and update `ITestTaskSettings` to handle `.slnx` file format limitations
* Add code coverage task implementation and update related settings for enhanced test reporting
- Implement `CodeCoverageTask` using `ReportGenerator`.
- Enhance `IBuildContext` with properties for managing code coverage directories and reports.
- Update `TestTask` to support coverage collection and generate TRX reports.
- Refactor `ITestTaskSettings` to include coverage-related settings.
- Modify `.github/workflows` to execute the `codecoverage` task in the integration pipeline.
- Add `ReportGenerator` to `CakeBuildSample` dependencies.
* Add detailed build version logging to `BuildTask`
- Log informational, assembly, and file versions during solution build for improved traceability.
* Add `GitVersion.Tool` as a dependency to `CakeBuildSample`
* Update `ICodeCoverageTaskSettings` with .NET framework property and configure tool paths in `CakeBuildSample`
- Added `Framework` property to `ICodeCoverageTaskSettings` for dynamic .NET version handling.
- Configured `CakeHost` in `CakeBuildSample` to use a temporary tools directory and install required tools.
* Enable `windows-latest` runner in the integration workflow and update `DeployNuGet` step to run code coverage task.
* Update `CodeCoverageTask` to log ReportGenerator process arguments and enhance tool installation in `CakeBuildSample`
- Add diagnostic logging for ReportGenerator process arguments in `CodeCoverageTask` using `Information`.
- Use `DotNetToolPackageInstaller` in `CakeBuildSample` for improved tool installation patterns.
- Update tool URIs to use `dotnet:` scheme for consistency.
* Update `CodeCoverageTask` to use `ICodeCoverageTaskSettings` for dynamic configuration
- Refactor `CodeCoverageTask` to retrieve settings from `ICodeCoverageTaskSettings`.
- Add `ReportGlobPattern` and `ReportTypes`
* Add `IPackTaskSettings` and implement `PackTask` with NuGet packaging functionality
- Introduced `IPackTaskSettings` for configuring NuGet packaging properties.
- Implemented `PackTask` to use `DotNetPack` with dynamic settings retrieval.
- Updated `IDefaultTaskSettings` to include `IPackTaskSettings`.
- Enhanced `BuildTask` with detailed package version logging.
- Modified `GitVersion.yml` for improved feature branch regex and deployment configurations.
* Add `PackageLicenseExpression` and MSBuild settings extensions for enhanced packaging configuration
- Introduced `PackageLicenseExpression` with predefined license constants.
- Added MSBuild settings extension methods for configuring package properties (`WithPackageProjectUrl`, `WithPackageLicenseUrl`, `WithPackageLicenseExpression`, and `WithCopyright`).
- Updated `PackTask` to utilize the new extension methods for cleaner configuration of packaging settings.
* Rename `NuGetPublishTask` to `NuGetPushTask` and implement push functionality
- Updated class, interfaces, and settings from `NuGetPublish` to `NuGetPush` for consistency with naming conventions.
- Added NuGet push implementation using `DotNetNuGetPush` with configurable settings.
- Extended `IDefaultTaskSettings` to include `INuGetPushTaskSettings`.
* Rename `[TaskName]` from `NuGetPublish` to `NuGetPush` for consistency with task naming conventions.
* - Update task settings to use `GetRequiredSettings<T>` for improved error handling
- Add `DefaultHostSetup` to summarize setup configuration during execution
- Rename `PackageLicenseExpression` to `PackageLicenseExpressions` for consistency
- Introduce `PrintSetupSummary` property for better control over setup logging
- Enhance integration workflow for NuGet push with added `NUGET_TOKEN` configuration
* Simplify integration workflow by removing auto-generation comments and adding NuGet package directory listing.
* Add warning log for GitVersion fallback and improve exception handling
- Enable `coverage-report` artifact publishing in the integration workflow
* Update tool URI scheme to `nuget:` for `GitVersion.Tool` and enable NuGet cache in integration workflow
* Update `GitVersion` tool to use `GitVersion.CommandLine` instead of `GitVersion.Tool` in `CakeBuildSample`
* Refactor `GitVersion` usage in `BuildContext` and update tool URI in `CakeBuildSample`
- Replaced `Version` property in `BuildContext` with a computed getter using `GetGitVersionSafe`.
- Updated `GitVersion.Tool` URI scheme in `CakeBuildSample` to use `dotnet:` instead of `nuget:`.
* Comment out `UsePackageInstaller` in `CakeBuildSample` and update tool installation logic
* Add `InstallTools` method to simplify tool installation and refactor tool setup logic
- Introduced `InstallTools` method in `ICakeHostBuilder` for streamlined tool installation.
- Created `ToolInstallation`, `DotNetToolInstallation`, and `NuGetToolInstallation` classes for better type safety and tool configuration.
- Refactored `CakeBuildSample` to use the new `InstallTools` API, replacing inline tool path and installation logic.
* Refactor `BuildContext` to `CakeBuildContext` for improved clarity and consistency in context naming.
* Replace Nuke build system with Cake.build and migrate corresponding build logic, settings, and configurations.
* Set `TERM=xterm` and enable ANSI color redirection in integration workflow environments
* Refactor `TestServerContext` to use `IHost` instead of `TestServer`'s built-in hosting and clean up unused package references in projects.
* Simplify build script by removing `pipefail` option in `set` command.
* Refactor build script to simplify .NET SDK setup and update integration workflow to use PowerShell build script
* Update integration workflow to use `bash` instead of `sh` for NuGet push
* Update integration workflow step names for consistency and clarity in build targets
* Update integration workflow to use `cmd` for build commands instead of `sh` and `ps1`
* Add "samples" as default source directory in `ICleanTaskSettings` and fix coverage report path in integration workflow
* Remove deprecated Nuke build system configurations and update workflows for Cake.build integration.
* Refactor tasks and settings to simplify syntax, enforce immutability, and add JetBrains annotations.
* Set `TERM` and enable ANSI color redirection in all workflow environments; update GitVersion config for streamlined branch handling
* Update release workflow to use `pack` target instead of `nugetpush` for build command for check functionality
* Log version information (informational, assembly, file, and package versions) in build context output.
* Remove CreativeCoders.NukeBuild and related components, actions, and configurations. Migrate to alternative build system.
* Update pull-request workflow to use `-t pack` syntax for build command
* Remove redundant `_testServer.Dispose()` call in `TestServerContext` deconstruction
* Update GitVersion config: change pull-request mode to ContinuousDelivery, refine label, and set prevent-increment behavior
* Refine GitVersion regex to group branch name in pull-request handling
* Update GitVersion config: revise pull-request label and regex for better name handling1 parent 702344f commit 46eb300
127 files changed
Lines changed: 1476 additions & 2726 deletions
File tree
- .github/workflows
- .nuke
- build
- samples
- BlazorWebAssemblySampleApp
- CakeBuildSample
- source
- AspNetCore/CreativeCoders.AspNetCore.TokenAuthApi
- CakeBuild/CreativeCoders.CakeBuild
- BuildServer
- Tasks
- Defaults
- Templates
- Settings
- Core/CreativeCoders.Core
- Messaging/CreativeCoders.Messaging.DefaultMessageQueue
- NukeBuild
- CreativeCoders.NukeBuild.Components
- Parameters
- Targets
- Settings
- CreativeCoders.NukeBuild
- BuildActions
- tests
- CreativeCoders.AspNetCore.Tests/TokenAuth/Jwt
- CreativeCoders.MiscTest.UnitTests
- NukeBuild
- CreativeCoders.NukeBuild.Tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 1 | | |
18 | 2 | | |
19 | 3 | | |
| |||
25 | 9 | | |
26 | 10 | | |
27 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
28 | 15 | | |
29 | | - | |
| 16 | + | |
30 | 17 | | |
31 | 18 | | |
32 | | - | |
| 19 | + | |
33 | 20 | | |
34 | 21 | | |
35 | 22 | | |
36 | | - | |
37 | 23 | | |
38 | 24 | | |
39 | | - | |
40 | | - | |
| 25 | + | |
41 | 26 | | |
42 | | - | |
43 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
44 | 30 | | |
45 | | - | |
46 | 31 | | |
47 | | - | |
48 | | - | |
| 32 | + | |
| 33 | + | |
49 | 34 | | |
50 | 35 | | |
51 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
52 | 40 | | |
53 | | - | |
| 41 | + | |
54 | 42 | | |
55 | 43 | | |
56 | | - | |
| 44 | + | |
57 | 45 | | |
58 | 46 | | |
59 | 47 | | |
60 | | - | |
61 | 48 | | |
62 | 49 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 50 | + | |
| 51 | + | |
67 | 52 | | |
68 | 53 | | |
69 | | - | |
70 | 54 | | |
71 | | - | |
72 | | - | |
| 55 | + | |
| 56 | + | |
73 | 57 | | |
74 | 58 | | |
75 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
76 | 63 | | |
77 | 64 | | |
78 | 65 | | |
79 | 66 | | |
80 | | - | |
| 67 | + | |
81 | 68 | | |
82 | 69 | | |
83 | 70 | | |
84 | | - | |
85 | 71 | | |
86 | 72 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 73 | + | |
| 74 | + | |
91 | 75 | | |
92 | 76 | | |
93 | | - | |
94 | 77 | | |
95 | | - | |
96 | | - | |
| 78 | + | |
| 79 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 1 | | |
18 | 2 | | |
19 | 3 | | |
| |||
25 | 9 | | |
26 | 10 | | |
27 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
28 | 15 | | |
29 | 16 | | |
30 | 17 | | |
31 | 18 | | |
32 | | - | |
| 19 | + | |
33 | 20 | | |
34 | 21 | | |
35 | 22 | | |
36 | | - | |
37 | 23 | | |
38 | 24 | | |
39 | | - | |
40 | | - | |
| 25 | + | |
| 26 | + | |
41 | 27 | | |
42 | | - | |
| 28 | + | |
43 | 29 | | |
44 | 30 | | |
45 | | - | |
46 | 31 | | |
47 | | - | |
48 | | - | |
| 32 | + | |
| 33 | + | |
49 | 34 | | |
50 | 35 | | |
51 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
52 | 40 | | |
53 | 41 | | |
54 | 42 | | |
55 | 43 | | |
56 | | - | |
| 44 | + | |
57 | 45 | | |
58 | 46 | | |
59 | 47 | | |
60 | | - | |
61 | 48 | | |
62 | 49 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 50 | + | |
| 51 | + | |
67 | 52 | | |
68 | 53 | | |
69 | | - | |
70 | 54 | | |
71 | | - | |
72 | | - | |
| 55 | + | |
| 56 | + | |
73 | 57 | | |
74 | 58 | | |
75 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
76 | 63 | | |
77 | 64 | | |
78 | 65 | | |
79 | 66 | | |
80 | | - | |
| 67 | + | |
81 | 68 | | |
82 | 69 | | |
83 | 70 | | |
84 | | - | |
85 | 71 | | |
86 | 72 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 73 | + | |
| 74 | + | |
91 | 75 | | |
92 | 76 | | |
93 | | - | |
94 | 77 | | |
95 | | - | |
96 | | - | |
| 78 | + | |
| 79 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 1 | | |
18 | 2 | | |
19 | 3 | | |
| |||
25 | 9 | | |
26 | 10 | | |
27 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
28 | 15 | | |
29 | 16 | | |
30 | 17 | | |
31 | 18 | | |
32 | | - | |
| 19 | + | |
33 | 20 | | |
34 | 21 | | |
35 | 22 | | |
36 | | - | |
37 | 23 | | |
38 | 24 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 25 | + | |
| 26 | + | |
43 | 27 | | |
44 | 28 | | |
45 | | - | |
46 | 29 | | |
47 | | - | |
48 | | - | |
| 30 | + | |
| 31 | + | |
49 | 32 | | |
50 | 33 | | |
51 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
52 | 38 | | |
53 | 39 | | |
54 | 40 | | |
55 | 41 | | |
56 | | - | |
| 42 | + | |
57 | 43 | | |
58 | 44 | | |
59 | 45 | | |
60 | | - | |
61 | 46 | | |
62 | 47 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 48 | + | |
| 49 | + | |
67 | 50 | | |
68 | 51 | | |
69 | | - | |
70 | 52 | | |
71 | | - | |
72 | | - | |
| 53 | + | |
| 54 | + | |
73 | 55 | | |
74 | 56 | | |
75 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
76 | 61 | | |
77 | 62 | | |
78 | 63 | | |
79 | 64 | | |
80 | | - | |
| 65 | + | |
81 | 66 | | |
82 | 67 | | |
83 | 68 | | |
84 | | - | |
85 | 69 | | |
86 | 70 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 71 | + | |
| 72 | + | |
91 | 73 | | |
92 | 74 | | |
93 | | - | |
94 | 75 | | |
95 | | - | |
96 | | - | |
| 76 | + | |
| 77 | + | |
0 commit comments