Sha256: ea9dff20bc6e80fbdfbfa4e217a1685a103077735632bd26ca53969a07ca2846

Contents?: true

Size: 1.25 KB

Versions: 10

Compression:

Stored size: 1.25 KB

Contents

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

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

10 entries across 10 versions & 1 rubygems

Version Path
fastlane-2.76.0.beta.20180111010004 fastlane/swift/main.swift
fastlane-2.76.0.beta.20180110010004 fastlane/swift/main.swift
fastlane-2.75.1 fastlane/swift/main.swift
fastlane-2.75.0 fastlane/swift/main.swift
fastlane-2.75.0.beta.20180109010003 fastlane/swift/main.swift
fastlane-2.74.1 fastlane/swift/main.swift
fastlane-2.74.0 fastlane/swift/main.swift
fastlane-2.74.0.beta.20180108010004 fastlane/swift/main.swift
fastlane-2.74.0.beta.20180107010004 fastlane/swift/main.swift
fastlane-2.74.0.beta.20180106010004 fastlane/swift/main.swift