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:
@@ -0,0 +1,16 @@
|
||||
public enum Artifact: String {
|
||||
case executable
|
||||
case image
|
||||
}
|
||||
|
||||
// MARK: - Randomable
|
||||
|
||||
extension Artifact: Randomable {
|
||||
|
||||
// MARK: Functions
|
||||
|
||||
static func random() -> Artifact {
|
||||
.allCases.randomElement() ?? .executable
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,9 +3,9 @@ public enum IDE: String {
|
||||
case xcode
|
||||
}
|
||||
|
||||
// MARK: - Extension
|
||||
// MARK: - Randomable
|
||||
|
||||
extension IDE {
|
||||
extension IDE: Randomable {
|
||||
|
||||
// MARK: Functions
|
||||
|
||||
@@ -14,7 +14,3 @@ extension IDE {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - CaseIterable
|
||||
|
||||
extension IDE: CaseIterable {}
|
||||
|
||||
Reference in New Issue
Block a user