Sha256: c80a105dbfc3199764ee5b8e9319801146fbaef840e03daab1c90d4008168851

Contents?: true

Size: 1.48 KB

Versions: 159

Compression:

Stored size: 1.48 KB

Contents

//
//  main.swift
//  FastlaneSwiftRunner
//
//  Created by Joshua Liebowitz on 8/26/17.
//  Copyright © 2017 Joshua Liebowitz. All rights reserved.
//

//
//  ** NOTE **
//  This file is provided by fastlane and WILL be overwritten in future updates
//  If you want to add extra functionality to this project, create a new file in a
//  new group so that it won't be marked for upgrade
//

import Foundation

let argumentProcessor = ArgumentProcessor(args: CommandLine.arguments)
let timeout = argumentProcessor.commandTimeout

class MainProcess {
    var doneRunningLane = false
    var thread: Thread!
    
    @objc func connectToFastlaneAndRunLane() {
        runner.startSocketThread()
        
        let completedRun = Fastfile.runLane(named: argumentProcessor.currentLane, parameters: argumentProcessor.laneParameters())
        if completedRun {
            runner.disconnectFromFastlaneProcess()
        }
        
        doneRunningLane = true
    }
    
    func startFastlaneThread() {
        thread = Thread(target: self, selector: #selector(connectToFastlaneAndRunLane), object: nil)
        thread.name = "worker thread"
        thread.start()
    }
}

let process: MainProcess = MainProcess()
process.startFastlaneThread()

while (!process.doneRunningLane && (RunLoop.current.run(mode: RunLoopMode.defaultRunLoopMode, before: Date(timeIntervalSinceNow: 2)))) {
    // no op
}

// Please don't remove the lines below
// They are used to detect outdated files
// FastlaneRunnerAPIVersion [0.9.2]

Version data entries

159 entries across 159 versions & 1 rubygems

Version Path
fastlane-2.98.0 fastlane/swift/main.swift
fastlane-2.97.0 fastlane/swift/main.swift
fastlane-2.96.1 fastlane/swift/main.swift
fastlane-2.96.0 fastlane/swift/main.swift
fastlane-2.96.0.beta.20180521050117 fastlane/swift/main.swift
fastlane-2.96.0.beta.20180520050019 fastlane/swift/main.swift
fastlane-2.96.0.beta.20180519050103 fastlane/swift/main.swift
fastlane-2.96.0.beta.20180518050116 fastlane/swift/main.swift
fastlane-2.96.0.beta.20180517050058 fastlane/swift/main.swift
fastlane-2.96.0.beta.20180516050022 fastlane/swift/main.swift
fastlane-2.96.0.beta.20180515050025 fastlane/swift/main.swift
fastlane-2.96.0.beta.20180514050029 fastlane/swift/main.swift
fastlane-2.96.0.beta.20180513050015 fastlane/swift/main.swift
fastlane-2.96.0.beta.20180512050121 fastlane/swift/main.swift
fastlane-2.96.0.beta.20180511050050 fastlane/swift/main.swift
fastlane-2.96.0.beta.20180510050112 fastlane/swift/main.swift
fastlane-2.95.0 fastlane/swift/main.swift
fastlane-2.95.0.beta.20180509050014 fastlane/swift/main.swift
fastlane-2.95.0.beta.20180508050130 fastlane/swift/main.swift
fastlane-2.95.0.beta.20180507050125 fastlane/swift/main.swift