Skip to content
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

added version flag to arg manager and print version in aftermath log #40

Merged
merged 1 commit into from
Oct 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions aftermath/Command.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Command {
static var analysisDir: String? = nil
static var outputDir: String = "/tmp"
static var collectDirs: [String] = []
static let version: String = "1.1.0"

static func main() {
setup(with: CommandLine.arguments)
Expand Down Expand Up @@ -59,6 +60,9 @@ class Command {
i += 1
}
}
case "-v", "--version":
print(version)
exit(1)
default:
if !arg.starts(with: "-") {
} else {
Expand All @@ -76,6 +80,7 @@ class Command {
CaseFiles.CreateAnalysisCaseDir()

let mainModule = AftermathModule()
mainModule.log("Running Aftermath Version \(version)")
mainModule.log("Aftermath Analysis Started")

guard let dir = Self.analysisDir else {
Expand Down Expand Up @@ -108,6 +113,7 @@ class Command {
} else {
CaseFiles.CreateCaseDir()
let mainModule = AftermathModule()
mainModule.log("Running Aftermath Version \(version)")
mainModule.log("Aftermath Collection Started")
mainModule.addTextToFile(atUrl: CaseFiles.metadataFile, text: "file,birth,modified,accessed,permissions,uid,gid, downloadedFrom")

Expand Down