From c5c4e4df3db0737b749ea91f903c8cf0f1ecd6aa Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Sun, 18 Jul 2021 15:01:10 +0200 Subject: [PATCH] v2.6.1 --- Kit/plugins/Server.swift | 7 +++++-- Stats.xcodeproj/project.pbxproj | 4 ++-- Stats.xcodeproj/xcshareddata/xcschemes/Stats.xcscheme | 4 ++++ Stats/AppDelegate.swift | 6 +++++- Stats/Supporting Files/Info.plist | 2 +- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Kit/plugins/Server.swift b/Kit/plugins/Server.swift index 49123b6ad55..6e92eb580e6 100644 --- a/Kit/plugins/Server.swift +++ b/Kit/plugins/Server.swift @@ -21,6 +21,8 @@ struct event: Codable { var device: String var os: String var language: String + + var omit: Bool } public class Server { @@ -41,7 +43,7 @@ public class Server { } } - public func sendEvent(modules: [String]) { + public func sendEvent(modules: [String], omit: Bool = false) { let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String let build = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String let systemVersion = ProcessInfo().operatingSystemVersion @@ -52,7 +54,8 @@ public class Server { build: build ?? "unknown", modules: modules, device: SystemKit.shared.modelName() ?? "unknown", os: systemVersion.getFullVersion(), - language: Locale.current.languageCode ?? "unknown" + language: Locale.current.languageCode ?? "unknown", + omit: omit ) var request = URLRequest(url: self.url) diff --git a/Stats.xcodeproj/project.pbxproj b/Stats.xcodeproj/project.pbxproj index 2a2e0fb43f1..65a2c4464ab 100644 --- a/Stats.xcodeproj/project.pbxproj +++ b/Stats.xcodeproj/project.pbxproj @@ -2000,7 +2000,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.13; - MARKETING_VERSION = 2.6.0; + MARKETING_VERSION = 2.6.1; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -2033,7 +2033,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.13; - MARKETING_VERSION = 2.6.0; + MARKETING_VERSION = 2.6.1; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Stats.xcodeproj/xcshareddata/xcschemes/Stats.xcscheme b/Stats.xcodeproj/xcshareddata/xcschemes/Stats.xcscheme index c5a48ababfb..981014d3335 100644 --- a/Stats.xcodeproj/xcshareddata/xcschemes/Stats.xcscheme +++ b/Stats.xcodeproj/xcshareddata/xcschemes/Stats.xcscheme @@ -60,6 +60,10 @@ + + diff --git a/Stats/AppDelegate.swift b/Stats/AppDelegate.swift index 3c53c577dd5..2cbf5a113d0 100755 --- a/Stats/AppDelegate.swift +++ b/Stats/AppDelegate.swift @@ -54,7 +54,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele self.defaultValues() self.updateCron() info("Stats started in \((startingPoint.timeIntervalSinceNow * -1).rounded(toPlaces: 4)) seconds") - Server.shared.sendEvent(modules: modules.filter({ $0.enabled != false && $0.available != false }).map({ $0.config.name })) + + Server.shared.sendEvent( + modules: modules.filter({ $0.enabled != false && $0.available != false }).map({ $0.config.name }), + omit: CommandLine.arguments.contains("--omit") + ) } func applicationWillTerminate(_ aNotification: Notification) { diff --git a/Stats/Supporting Files/Info.plist b/Stats/Supporting Files/Info.plist index ca483c5dcce..54c9b221f18 100755 --- a/Stats/Supporting Files/Info.plist +++ b/Stats/Supporting Files/Info.plist @@ -17,7 +17,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 289 + 290 Description Simple macOS system monitor in your menu bar LSApplicationCategoryType