mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 08:15:24 +00:00
use swift 6.2 for dev tools (#5720)
This commit is contained in:
@@ -125,7 +125,7 @@ struct BuildSDK: AsyncParsableCommand {
|
||||
/// Update project.yml with the local path of the SDK.
|
||||
func updateProjectYAML() throws {
|
||||
let yamlURL = URL.projectDirectory.appendingPathComponent("project.yml")
|
||||
let yamlString = try String(contentsOf: yamlURL)
|
||||
let yamlString = try String(contentsOf: yamlURL, encoding: .utf8)
|
||||
guard var projectConfig = try Yams.compose(yaml: yamlString) else { throw Error.failureParsingProjectYAML }
|
||||
|
||||
projectConfig["packages"]?.mapping?["MatrixRustSDK"]? = ["path": "../matrix-rust-sdk"]
|
||||
|
||||
@@ -14,7 +14,7 @@ struct BumpCalendarVersion: ParsableCommand {
|
||||
/// Updates the project YAML with the new version.
|
||||
private func updateProjectYAML() throws {
|
||||
let yamlURL = URL.projectDirectory.appendingPathComponent("project.yml")
|
||||
let yamlString = try String(contentsOf: yamlURL)
|
||||
let yamlString = try String(contentsOf: yamlURL, encoding: .utf8)
|
||||
|
||||
// Use regex instead of Yams to preserve any whitespace, comments etc in the file.
|
||||
let marketingVersionRegex = /MARKETING_VERSION:\s*([^\s]+)/
|
||||
|
||||
@@ -25,7 +25,7 @@ struct CI: ParsableCommand {
|
||||
/// Reads the `MARKETING_VERSION` from `project.yml`.
|
||||
static func readMarketingVersion() throws -> String {
|
||||
let projectURL = URL.projectDirectory.appending(component: "project.yml")
|
||||
let projectString = try String(contentsOf: projectURL)
|
||||
let projectString = try String(contentsOf: projectURL, encoding: .utf8)
|
||||
|
||||
guard let projectConfig = try Yams.compose(yaml: projectString),
|
||||
let version = projectConfig["settings"]?["MARKETING_VERSION"]?.string else {
|
||||
|
||||
@@ -26,7 +26,7 @@ struct ConfigureNightly: AsyncParsableCommand {
|
||||
/// Adds the Nightly variant include path to `project.yml` if it isn't already present.
|
||||
private func addNightlyVariant() throws {
|
||||
let projectURL = URL.projectDirectory.appending(component: "project.yml")
|
||||
let projectString = try String(contentsOf: projectURL)
|
||||
let projectString = try String(contentsOf: projectURL, encoding: .utf8)
|
||||
guard var projectConfig = try Yams.compose(yaml: projectString) else {
|
||||
throw ValidationError("Failed to parse project.yml.")
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ struct ReleaseToGitHub: AsyncParsableCommand {
|
||||
|
||||
let releaseDate = Date().formatted(.iso8601.year().month().day())
|
||||
|
||||
let existingContent = try String(contentsOf: changesURL)
|
||||
let existingContent = try String(contentsOf: changesURL, encoding: .utf8)
|
||||
let newContent = "## Changes in \(version) (\(releaseDate))\(cleanedNotes)\n\n\(existingContent)"
|
||||
|
||||
try newContent.write(to: changesURL, atomically: true, encoding: .utf8)
|
||||
|
||||
Reference in New Issue
Block a user