INNER CODE UNIT · Swift

run

mono0926/LicensePlist · Sources/LicensePlist/AddAcknowledgementsCopyScriptCommand.swift:25

        mutating func run() throws {
            Logger.configure(logLevel: .normalLogLevel, colorCommandLineFlag: nil)
            Log.info("Parsing \(xcodeproj)...")
            let url = URL(fileURLWithPath: xcodeproj)
            let file = try XCProjectFile(xcodeprojURL: url, ignoreReferenceErrors: true)

            for target in file.project.targets.compactMap(\.value) {
                guard self.target.contains(target.name) else {
                    Log.info("Target \(target.name) skipped")
                    continue
                }

                guard !target.buildPhases.hasScript(named: Self.scriptName) else {
                    Log.warning("\(target.name) already has \"\(Self.scriptName)\" build phase")
                    continue
                }

                Log.info("Processing \(target.name)...")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…