diff --git a/GitHubListener/AppDelegate.swift b/GitHubListener/AppDelegate.swift
index ba632ca..a6cac70 100644
--- a/GitHubListener/AppDelegate.swift
+++ b/GitHubListener/AppDelegate.swift
@@ -52,7 +52,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCent
if let accessToken = self.defaults.string(forKey: "GHL.access_token") {
self.accessToken = accessToken
- print("access_token read", accessToken)
+// print("access_token read", accessToken)
if let username = self.defaults.string(forKey: "GHL.username") {
self.username = username
updateData()
@@ -204,9 +204,13 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCent
let testDate:Date = commit.description.author.date
if (date != nil && date != testDate) {
if (commit.description.verification.verified) {
- self.showNotification(title: "\(repo.fullName)", subtitle: "\(commit.author.login) added commit", informativeText: commit.description.message, image: commit.author.avatarUrl, url: commit.htmlUrl)
+ if self.username != commit.author.login { // TODO: make it customizable
+ self.showNotification(title: "\(repo.fullName)", subtitle: "\(commit.author.login) added commit", informativeText: commit.description.message, image: commit.author.avatarUrl, url: commit.htmlUrl)
+ }
} else {
- self.showNotification(title: "\(repo.fullName)", subtitle: "\(commit.description.author.name) added commit", informativeText: commit.description.message, url: commit.htmlUrl)
+ if self.username != commit.description.author.name { // TODO: make it customizable
+ self.showNotification(title: "\(repo.fullName)", subtitle: "\(commit.description.author.name) added commit", informativeText: commit.description.message, url: commit.htmlUrl)
+ }
}
}
}
diff --git a/GitHubListener/Info.plist b/GitHubListener/Info.plist
index 95440ea..00a9057 100644
--- a/GitHubListener/Info.plist
+++ b/GitHubListener/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.3
+ 0.4
CFBundleVersion
1
LSApplicationCategoryType
diff --git a/build.sh b/build.sh
index 707bff0..644b00c 100755
--- a/build.sh
+++ b/build.sh
@@ -1,26 +1,24 @@
#!/bin/bash
-NAME='GitHubListener'
-
-rm -rf Release 2>/dev/null
+rm -r Release 2>/dev/null
xcodebuild archive \
- -scheme "$NAME" \
- -archivePath Release/App.xcarchive
+ -scheme "GitHubListener" \
+ -archivePath Release/App.xcarchive
xcodebuild \
- -exportArchive \
- -archivePath Release/App.xcarchive \
- -exportOptionsPlist export-options.plist \
- -exportPath Release
+ -exportArchive \
+ -archivePath Release/App.xcarchive \
+ -exportOptionsPlist export-options.plist \
+ -exportPath Release
cd Release
rm -r App.xcarchive
+sleep 2
-sleep 5
-
-VER=`mdls -raw -name kMDItemVersion $NAME.app`
+# Prerequisite: npm i -g create-dmg
+# create-dmg "${NAME}.app"
-ARCH_NAME="$NAME.v$VER.zip"
-zip -r $ARCH_NAME $NAME.app
-# echo "$ARCH_NAME"
+VERSION=`mdls -raw -name kMDItemVersion GitHubListener.app`
+echo $VERSION
+zip -r "GitHubListener.v$VERSION.zip" "GitHubListener.app"