Configure diagnostics (and MapLibre) using Pkl. (#3820)
* Bump the version for the next release. * Ignore all generated sources. * Use Pkl+XcodeGen to inject secrets instead of the project. * Inject the PostHog/Sentry/Rageshake configuration from the environment. * Fix bad unicode. * Fix unit tests.
This commit is contained in:
17
Secrets/Secrets.pkl
Normal file
17
Secrets/Secrets.pkl
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// Copyright 2025 New Vector Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
// Analytics and Diagnostics
|
||||
|
||||
sentryDSN = read("env:SENTRY_DSN")
|
||||
postHogHost = read("env:POSTHOG_HOST")
|
||||
postHogAPIKey = read("env:POSTHOG_API_KEY")
|
||||
rageshakeServerURL = read("env:RAGESHAKE_SERVER_URL")
|
||||
|
||||
// Maps
|
||||
|
||||
mapLibreAPIKey = read("env:MAPLIBRE_API_KEY")
|
||||
19
Secrets/Secrets.swift
Normal file
19
Secrets/Secrets.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
// swiftlint:disable all
|
||||
// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen
|
||||
|
||||
import Foundation
|
||||
|
||||
// swiftlint:disable superfluous_disable_command
|
||||
// swiftlint:disable file_length
|
||||
|
||||
// MARK: - YAML Files
|
||||
|
||||
// swiftlint:disable identifier_name line_length number_separator type_body_length
|
||||
internal enum Secrets {
|
||||
internal static let mapLibreAPIKey: String = "your_key"
|
||||
internal static let postHogAPIKey: String = "your_key"
|
||||
internal static let postHogHost: String = "https://posthog.localhost"
|
||||
internal static let rageshakeServerURL: String = "https://rageshake.localhost"
|
||||
internal static let sentryDSN: String = "https://sentry.localhost"
|
||||
}
|
||||
// swiftlint:enable identifier_name line_length number_separator type_body_length
|
||||
Reference in New Issue
Block a user