From 37da5690510b18e7f108d384512f5bdb845a40c0 Mon Sep 17 00:00:00 2001 From: Mat Ryer Date: Fri, 19 Feb 2016 15:58:47 +0000 Subject: [PATCH 1/2] added slack integration (for Travis) --- .travis.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a43dd7fc..336d9b487 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,19 +4,26 @@ xcode_project: App/BitBar.xcodeproj xcode_scheme: BitBar xcode_sdk: macosx10.11 before_install: - - brew update - - brew outdated xctool || brew upgrade xctool -script: if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then xctool -project $TRAVIS_XCODE_PROJECT -scheme $TRAVIS_XCODE_SCHEME -sdk $TRAVIS_XCODE_SDK -configuration Release OBJROOT=$PWD/build SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO build analyze; else xctool -project $TRAVIS_XCODE_PROJECT -scheme $TRAVIS_XCODE_SCHEME -sdk $TRAVIS_XCODE_SDK -configuration Release OBJROOT=$PWD/build SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO build analyze -failOnWarnings; fi +- brew update +- brew outdated xctool || brew upgrade xctool +script: if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then xctool -project $TRAVIS_XCODE_PROJECT + -scheme $TRAVIS_XCODE_SCHEME -sdk $TRAVIS_XCODE_SDK -configuration Release OBJROOT=$PWD/build + SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO build analyze; else xctool -project $TRAVIS_XCODE_PROJECT + -scheme $TRAVIS_XCODE_SCHEME -sdk $TRAVIS_XCODE_SDK -configuration Release OBJROOT=$PWD/build + SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO build analyze -failOnWarnings; fi before_deploy: - - OUTPUTDIR="$PWD/build/Release" - - cd $OUTPUTDIR - - zip -r "BitBar-$TRAVIS_TAG.zip" "BitBar.app" +- OUTPUTDIR="$PWD/build/Release" +- cd $OUTPUTDIR +- zip -r "BitBar-$TRAVIS_TAG.zip" "BitBar.app" deploy: provider: releases api_key: secure: VB7wqPRAmwRxX1ugTss4lWdcCjMO4+9yYuvkSKIhRz5PcKFTdgIE5Ol29wssYSlEnk1D5ZqeCJBe3t2qowrxOKHWKJRxH5r4fbgYAYnbk9/nWsMLgWDn1mo4nYa0sD4GyMUDY9JqqmtBY3nZ2pYcJ0L1LmxUU+EHViwcBQz6G4Y= - file: "$OUTPUTDIR/BitBar-$TRAVIS_TAG.zip" + file: $OUTPUTDIR/BitBar-$TRAVIS_TAG.zip skip_cleanup: true on: repo: matryer/bitbar tags: true +notifications: + slack: + secure: TpJVJf/NWxDvHxPjaQJnVg4vlW6JeLQ7eWadzFo7sUNSdB7Tui703AvYjG8tZTlk2lJ/4bV4jKgz8+rSElkeGsfPLTgDU33IDmG3V9o6MrAeV/ZQL37793bj+zJFxNuOkoIBaBQt1aNDTuIDUB97MNv02Vklb1M7Yd44NRVXdHk= From b211f88fd4decd0a17ac057826750997296dc219 Mon Sep 17 00:00:00 2001 From: iosdeveloper Date: Fri, 19 Feb 2016 20:43:35 +0100 Subject: [PATCH 2/2] fixes #249 --- App/BitBar/AppDelegate.m | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/App/BitBar/AppDelegate.m b/App/BitBar/AppDelegate.m index 9174b72a4..698fb45f9 100644 --- a/App/BitBar/AppDelegate.m +++ b/App/BitBar/AppDelegate.m @@ -29,6 +29,11 @@ @implementation AppDelegate - (NSArray*) otherCopies { return [NSRunningApplication runningApplicationsWithBundleIdentifier:NSBundle.mainBundle.bundleIdentifier]; } - (void)applicationWillFinishLaunching:(NSNotification *)n { + // register custom url scheme handler + [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self + andSelector:@selector(handleGetURLEvent:withReplyEvent:) + forEventClass:kInternetEventClass + andEventID:kAEGetURL]; if (self.otherCopies.count <= 1) return; NSModalResponse runm = [[NSAlert alertWithMessageText:[NSString stringWithFormat:@"Another copy of %@ is already running.", NSBundle.mainBundle.infoDictionary[(NSString *)kCFBundleNameKey]] @@ -60,12 +65,6 @@ - (void) applicationDidFinishLaunching:(NSNotification*)n { // make a plugin manager [_pluginManager = [PluginManager.alloc initWithPluginPath:DEFS.pluginsDirectory] setupAllPlugins]; - - // register custom url scheme handler - [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self - andSelector:@selector(handleGetURLEvent:withReplyEvent:) - forEventClass:kInternetEventClass - andEventID:kAEGetURL]; } - (void) receiveWakeNote: (NSNotification*) note