Fountain Coach Gitowner-controlled · read only

CILocal.git · Package.swift

CILocal.git / Package.swift

revision 5e528d388faee6ea831ce0baa3aef38d631741d5 · complete file

// swift-tools-version: 6.0
// This package defines the Swift control plane for the local CI environment.
// It pulls in FountainStore and Swift‑SecretStore from the Fountain‑Coach
// organisation along with ArgumentParser and AsyncHTTPClient to build a
// command‑line interface.

import PackageDescription

let package = Package(
    name: "CIControlPlane",
    platforms: [
        // Target macOS 13 or later.  Adjust the minimum version as needed.
        .macOS(.v13)
    ],
    products: [
        // The control plane is delivered as a standalone executable called
        // `cicontrol`.  Running this binary will expose commands such as
        // `setup`, `status` and `mirror` that orchestrate your local CI stack.
        .executable(name: "cicontrol", targets: ["CIControlPlane"])
    ],
    dependencies: [
        // FountainStore provides durable persistence and an optional HTTP server.
        .package(url: "https://github.com/Fountain-Coach/Fountain-Store.git", from: "0.2.0"),
        // Swift‑SecretStore supplies secure storage for API keys and passwords.
        .package(url: "https://github.com/Fountain-Coach/swift-secretstore.git", from: "0.1.0"),
        // ArgumentParser is used to build a friendly CLI with subcommands.
        .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.3.0"),
        // AsyncHTTPClient enables HTTP requests to Jenkins, Gitea or other services.
        .package(url: "https://github.com/swift-server/async-http-client.git", from: "1.10.0"),
        // Swift OpenAPI runtime pieces vendored alongside generated clients.
        .package(url: "https://github.com/apple/swift-openapi-runtime.git", from: "1.7.0"),
        .package(url: "https://github.com/apple/swift-openapi-urlsession.git", from: "1.0.0"),
        // The generator package is added so `swift run swift-openapi-generator` can refresh vendored clients.
        .package(url: "https://github.com/apple/swift-openapi-generator.git", from: "1.6.0")
    ],
    targets: [
        .executableTarget(
            name: "CIControlPlane",
            dependencies: [
                .product(name: "FountainStore", package: "Fountain-Store"),
                .product(name: "SecretStore", package: "swift-secretstore"),
                .product(name: "ArgumentParser", package: "swift-argument-parser"),
                .product(name: "AsyncHTTPClient", package: "async-http-client"),
                .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
                .product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
            ],
            path: "Sources",
            sources: [
                "CIControlPlane",
                "Generated/GiteaClient"
            ],
            swiftSettings: [
                // Enable better concurrency checking and other compiler warnings.
                .enableExperimentalFeature("StrictConcurrency")
            ]
        ),
        .testTarget(
            name: "CIControlPlaneTests",
            dependencies: [
                "CIControlPlane"
            ],
            path: "Tests/CIControlPlaneTests"
        )
    ]
)