Skip to content

Commit

Permalink
v2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
exelban committed Jul 18, 2021
1 parent 570a7a6 commit c5c4e4d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
7 changes: 5 additions & 2 deletions Kit/plugins/Server.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ struct event: Codable {
var device: String
var os: String
var language: String

var omit: Bool
}

public class Server {
Expand All @@ -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
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Stats.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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)";
Expand Down Expand Up @@ -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)";
Expand Down
4 changes: 4 additions & 0 deletions Stats.xcodeproj/xcshareddata/xcschemes/Stats.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "--omit"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "--reset"
isEnabled = "NO">
Expand Down
6 changes: 5 additions & 1 deletion Stats/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion Stats/Supporting Files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>289</string>
<string>290</string>
<key>Description</key>
<string>Simple macOS system monitor in your menu bar</string>
<key>LSApplicationCategoryType</key>
Expand Down

0 comments on commit c5c4e4d

Please sign in to comment.