-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log Types #163
base: master
Are you sure you want to change the base?
Log Types #163
Changes from all commits
5e36c73
90d7fab
0956223
9c94d5d
b323773
b1c638d
8ede14e
3774b90
9aa08bf
b290ba8
12ebe8b
39e7ef4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// LogType.swift | ||
// | ||
// | ||
// Created by Danny Gilbert on 2/2/22. | ||
// | ||
|
||
import Foundation | ||
|
||
public enum LogType: String { | ||
case build = "Build" | ||
case indexBuild = "Index Build" | ||
case install = "Install" | ||
case issues = "Issues" | ||
case package = "Package" | ||
case run = "Run" | ||
case test = "Test" | ||
case updateSigning = "Update Signing" | ||
} | ||
|
||
// MARK: - Log Location | ||
public extension LogType { | ||
|
||
var path: String { | ||
"/Logs/\(self.rawValue)/" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,9 @@ struct DumpCommand: ParsableCommand { | |
commandName: "dump", | ||
abstract: "Dumps the xcactivitylog file into a JSON document" | ||
) | ||
|
||
@Option(name: .long, help: "Type of .xactivitylog file to look for.") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think about printing the available option values here as well to make it easier for the user? |
||
var logs: LogType = .build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: |
||
|
||
@Option(name: .long, help: "The path to a .xcactivitylog file.") | ||
var file: String? | ||
|
@@ -104,6 +107,7 @@ struct DumpCommand: ParsableCommand { | |
xcodeprojPath: xcodeproj ?? "", | ||
derivedDataPath: derivedData ?? "", | ||
xcactivitylogPath: file ?? "", | ||
logType: logs, | ||
strictProjectName: strictProjectName) | ||
let actionOptions = ActionOptions(reporter: .json, | ||
outputPath: output ?? "", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// | ||
// LogType+.swift | ||
// | ||
// | ||
// Created by Danny Gilbert on 2/2/22. | ||
// | ||
|
||
import XCLogParser | ||
import ArgumentParser | ||
|
||
extension LogType: ExpressibleByArgument { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this function is not used, was it supposed to be part of a refactor?