From 56068d160f173316a367666ab79a91af02701198 Mon Sep 17 00:00:00 2001 From: Sam Deane Date: Mon, 8 Aug 2022 17:46:21 +0100 Subject: [PATCH] Added better version output, and --about command. --- Package.swift | 2 +- Sources/XPkgCommand/main.swift | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Package.swift b/Package.swift index 417b446..20aecf7 100644 --- a/Package.swift +++ b/Package.swift @@ -14,7 +14,7 @@ let package = Package( ], dependencies: [ - .package(url: "https://github.com/elegantchaos/CommandShell.git", from: "2.1.4"), + .package(url: "https://github.com/elegantchaos/CommandShell.git", from: "2.1.5"), .package(url: "https://github.com/elegantchaos/Expressions.git", from: "1.1.1"), .package(url: "https://github.com/elegantchaos/Files.git", from: "1.2.2"), .package(url: "https://github.com/elegantchaos/Logger.git", from: "1.8.0"), diff --git a/Sources/XPkgCommand/main.swift b/Sources/XPkgCommand/main.swift index 04bdf99..2ea1eb7 100644 --- a/Sources/XPkgCommand/main.swift +++ b/Sources/XPkgCommand/main.swift @@ -11,10 +11,11 @@ import SemanticVersion var info: [String:Any] = [:] -let year = DateFormatter.localizedString(from: Date(), dateStyle: .long, timeStyle: .none) info[.versionInfoKey] = CurrentVersion.string info[.buildInfoKey] = CurrentVersion.build -info[.copyrightInfoKey] = "Copyright © \(year) Elegant Chaos. All rights reserved." + +let components = Calendar.current.dateComponents([.year], from: Date()) +info[.copyrightInfoKey] = "Copyright © \(components.year!) Elegant Chaos. All rights reserved." CommandShell.main(info: info)