Skip to content

Commit

Permalink
- fix update script (CRITICAL UPDATE); - v2.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
exelban committed Jul 4, 2020
1 parent a172785 commit 6100ba7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Stats.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 2.1.5;
MARKETING_VERSION = 2.1.6;
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1732,7 +1732,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 2.1.5;
MARKETING_VERSION = 2.1.6;
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
4 changes: 4 additions & 0 deletions Stats/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
self.updateActivity.repeats = true
self.updateActivity.interval = 60 * 60 * 12 // once in 12 hour

if store.bool(key: "checkUpdatesOnLogin", defaultValue: true) {
self.checkForNewVersion(false)
}

self.updateActivity.schedule { (completion: @escaping NSBackgroundActivityScheduler.CompletionHandler) in
if !store.bool(key: "checkUpdatesOnLogin", defaultValue: true) {
completion(NSBackgroundActivityScheduler.Result.finished)
Expand Down
4 changes: 2 additions & 2 deletions StatsKit/updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ if [[ "$STEP" == "1" ]]; then
/usr/bin/mktemp -d $MOUNT_PATH
/usr/bin/hdiutil attach "$DMG_PATH" -mountpoint "$MOUNT_PATH" -noverify -nobrowse -noautoopen

cp $MOUNT_PATH/Stats.app/Contents/Resources/Scripts/updater.sh $MOUNT_PATH/updater.sh
sh $MOUNT_PATH/updater.sh --step 2 --app "$CURRENT_PATH" --dmg "$DMG_PATH" &
cp $MOUNT_PATH/Stats.app/Contents/Resources/Scripts/updater.sh $TMPDIR/updater.sh
sh $TMPDIR/updater.sh --step 2 --app "$CURRENT_PATH" --dmg "$DMG_PATH" &

kill -9 $PID

Expand Down

0 comments on commit 6100ba7

Please sign in to comment.