Skip to content

Commit

Permalink
Merge pull request #40 from stuartjash/versioning
Browse files Browse the repository at this point in the history
added version flag to arg manager and print version in aftermath log
  • Loading branch information
stuartjash committed Oct 12, 2022
2 parents 2c4c7b8 + f04db72 commit e99ac5a
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit e99ac5a

Please sign in to comment.