Call the pipeline from within swift tools instead of through fastlane.

This commit is contained in:
Stefan Ceriu
2026-02-26 15:44:52 +02:00
committed by Stefan Ceriu
parent 4e99059952
commit 24d6affd7e
5 changed files with 20 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
{
"originHash" : "14d9f7d61d174bcc8bb501ca7bfd906a95e437203049c1756fd88e793c873bac",
"originHash" : "71f6164c8d5a9ab47b97fa1199452ba1dfad4d231138f74ed269754eed046617",
"pins" : [
{
"identity" : "swift-argument-parser",

View File

@@ -2,6 +2,20 @@
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
import Foundation
var dependencies: [Package.Dependency] = [
.package(url: "https://github.com/apple/swift-argument-parser", .upToNextMinor(from: "1.7.0")),
.package(url: "https://github.com/element-hq/swift-command-line-tools.git", branch: "main"),
// .package(path: "../../../swift-command-line-tools"),
.package(url: "https://github.com/swiftlang/swift-subprocess", .upToNextMinor(from: "0.3.0")),
.package(url: "https://github.com/jpsim/Yams", .upToNextMinor(from: "6.2.1")),
.package(url: "https://github.com/apple/swift-log", .upToNextMinor(from: "1.10.1"))
]
if FileManager.default.fileExists(atPath: "Enterprise/Pipeline/Package.swift") {
dependencies.append(.package(path: "./enterprise/pipeline"))
}
let package = Package(
name: "Element Swift",
@@ -11,14 +25,7 @@ let package = Package(
products: [
.executable(name: "tools", targets: ["Tools"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", .upToNextMinor(from: "1.7.0")),
.package(url: "https://github.com/element-hq/swift-command-line-tools.git", branch: "main"),
// .package(path: "../../../swift-command-line-tools"),
.package(url: "https://github.com/swiftlang/swift-subprocess", .upToNextMinor(from: "0.3.0")),
.package(url: "https://github.com/jpsim/Yams", .upToNextMinor(from: "6.2.1")),
.package(url: "https://github.com/apple/swift-log", .upToNextMinor(from: "1.10.1"))
],
dependencies: dependencies,
targets: [
.executableTarget(name: "Tools",
dependencies: [

View File

@@ -10,7 +10,7 @@ if [ "$CI_WORKFLOW" = "Nightly" ]; then
bundle exec fastlane config_nightly build_number:"$CI_BUILD_NUMBER"
elif [ "$CI_WORKFLOW" = "Element Pro" ]; then
# Xcode Cloud automatically fetches the submodules.
bundle exec fastlane config_element_pro
swift run pipeline configure Variants/ElementPro/ElementPro.pkl
else
bundle exec fastlane config_production
fi

View File

@@ -2,11 +2,6 @@ require 'yaml'
skip_docs
enterprise = '../Enterprise/Pipeline/Scripts/iOS/Fastfile'
if File.exist?(enterprise)
import enterprise
end
simulator_version = "26.1"
before_all do
@@ -125,7 +120,7 @@ lane :integration_tests do
end
lane :config_production do
update_foss_secrets()
sh("(cd .. && swift run pipeline update-foss-secrets)")
xcodegen(spec: "project.yml")
end
@@ -141,7 +136,7 @@ lane :config_nightly do |options|
data["include"].append({ "path" => "Variants/Nightly/nightly.yml" })
end
update_foss_secrets()
sh("(cd .. && swift run pipeline update-foss-secrets)")
File.open(target_file_path, 'w') { |f| YAML.dump(data, f) }