Improved the Build subcommand to support the building of Docker images (#11)

This PR contains the work done to support the building of Docker images in the `Build` subcommand in the executable target. So, for this purpose, the following task have been done:

- added a basic boilerplate of the `docker-compose.yml` file;
- fixed some issues found in the boilerplate of the `Dockerfile` file;
- defined the `Randomable` protocol;
- defined the `Artifact` enumeration;
- updated the `BuildProjectTask` task to support building Docker images if required;
- renamed the `BuildProjectTask` task as `BuildArtifactTask`.

Reviewed-on: #11
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #11.
This commit is contained in:
2025-02-22 00:33:52 +00:00
committed by Javier Cicchelli
parent 888d00c1e8
commit f8a14e46ed
15 changed files with 181 additions and 81 deletions
@@ -56,6 +56,7 @@ private extension FileTests {
"AppArguments.swift",
"AppBuilder.swift",
"AppOptions.swift",
"docker-compose.yml",
"Dockerfile",
".dockerignore",
"Environment+Properties.swift",
@@ -70,6 +71,7 @@ private extension FileTests {
"Library/Sources/Public/AppArguments.swift",
"Library/Sources/Public/AppBuilder.swift",
"App/Sources/AppOptions.swift",
"docker-compose.yml",
"Dockerfile",
".dockerignore",
"Library/Sources/Internal/Environment+Properties.swift",
@@ -86,6 +88,7 @@ private extension FileTests {
.app,
.root,
.root,
.root,
.libraryInternal,
.root,
.root,
@@ -100,6 +103,7 @@ private extension FileTests {
"Resources/Files/Sources/App",
"Resources/Files/Sources",
"Resources/Files/Sources",
"Resources/Files/Sources",
"Resources/Files/Sources/Library",
"Resources/Files/Sources",
"Resources/Files/Sources",
@@ -0,0 +1,32 @@
import Testing
@testable import ColibriLibrary
struct RandomableTest {
@Test func random() {
// GIVEN
let allCases = TestRandomable.allCases
// WHEN
let random = TestRandomable.random()
// THEN
#expect(allCases.contains(random))
}
}
// MARK: - Enumerations
enum TestRandomable: Randomable {
case someCase
case someOtherCase
// MARK: Functions
static func random() -> TestRandomable {
.allCases.randomElement() ?? .someCase
}
}