From a60d9a58405dbdf74441e75fe7ee0939f60f1f68 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sat, 11 Aug 2018 16:14:21 -0600 Subject: [PATCH 01/10] =?UTF-8?q?=F0=9F=99=88=20Ignore=20.envrc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 109 +++++++++++------------------------------------------ 1 file changed, 22 insertions(+), 87 deletions(-) diff --git a/.gitignore b/.gitignore index 8227e627e..56d9d45a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,99 +1,34 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser +*.hmap +*.ipa *.mode1v3 -!default.mode1v3 *.mode2v3 -!default.mode2v3 +*.moved-aside +*.pbxuser *.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other +*.xcarchive *.xccheckout -*.moved-aside -*.xcuserstate *.xcscmblueprint -*.xcarchive - -## Obj-C/Swift specific -*.hmap -*.ipa - -# Bundler -/.rubygems/ -/bin/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control -# -Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# CocoaSeeds -!Seeds/Seedfile.lock -Seeds/**/.git* -Seeds/**/.swift-version -Seeds/**/.travis.yml -Seeds/**/*.md -Seeds/**/Cartfile* -Seeds/**/Carthage/ -Seeds/**/LICENSE* -Seeds/**/Package.* -Seeds/**/*Info.plist -Seeds/**/*.podspec -Seeds/**/*.xc* -Seeds/**/Tests/ -# Commandant -!Seeds/Commandant/Source/*.swift -# Result -!Seeds/Result/Result/*.swift -Seeds/Quick -Seeds/Nimble - -## https://github.com/github/gitignore/blob/master/Global/OSX.gitignore -.DS_Store +*.xcuserstate +*.zip +.AppleDB +.AppleDesktop .AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume +.DS_Store .DocumentRevisions-V100 -.fseventsd +.LSOverride .Spotlight-V100 .TemporaryItems .Trashes .VolumeIcon.icns - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items +._* .apdisk - -# Build artifacts -*.zip +.envrc +.fseventsd +.rubygems/ +Carthage/Build +DerivedData +Pods/ +Temporary Items +bin/ +build/ +xcuserdata From 4a75478a6c42410d1c7c3e7c18866958e6c0b4d1 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sat, 11 Aug 2018 16:17:01 -0600 Subject: [PATCH 02/10] =?UTF-8?q?=F0=9F=94=96=20Version=201.4.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/mas-cli-Info.plist | 2 +- AppTests/Info.plist | 4 ++-- CHANGELOG.md | 7 ++++++- mas-cli.xcodeproj/project.pbxproj | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/App/mas-cli-Info.plist b/App/mas-cli-Info.plist index 2241efe18..6a348b273 100644 --- a/App/mas-cli-Info.plist +++ b/App/mas-cli-Info.plist @@ -11,6 +11,6 @@ CFBundleName mas-cli CFBundleShortVersionString - 1.4.1 + 1.4.2 diff --git a/AppTests/Info.plist b/AppTests/Info.plist index 694898d7c..2fab5c7d4 100644 --- a/AppTests/Info.plist +++ b/AppTests/Info.plist @@ -15,8 +15,8 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.4.1 + 1.4.2 CFBundleVersion - 10401000 + 10402000 diff --git a/CHANGELOG.md b/CHANGELOG.md index 84b05ac58..c8e1d2414 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] + + +## [v1.4.2] - 2018-08-11 + - ⛔ Disable `signin` command on macOS 10.13+ #162 - 🐛 Fix `signout` command #162 - ➖ CocoaSeeds #155 @@ -98,7 +102,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [v1.0.0] - 2015-09-20 - Initial Release -[Unreleased]: https://github.com/mas-cli/mas/compare/v1.4.1...HEAD +[Unreleased]: https://github.com/mas-cli/mas/compare/v1.4.2...HEAD +[v1.4.2]: https://github.com/mas-cli/mas/compare/v1.4.1...v1.4.2 [v1.4.1]: https://github.com/mas-cli/mas/compare/v1.4.0...v1.4.1 [v1.4.0]: https://github.com/mas-cli/mas/compare/v1.3.1...v1.4.0 [v1.3.1]: https://github.com/mas-cli/mas/compare/v1.3.0...v1.3.1 diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index 448d1ac71..e239b5188 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -504,7 +504,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CREATE_INFOPLIST_SECTION_IN_BINARY = YES; - CURRENT_PROJECT_VERSION = 10401000; + CURRENT_PROJECT_VERSION = 10402000; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -570,7 +570,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CREATE_INFOPLIST_SECTION_IN_BINARY = YES; - CURRENT_PROJECT_VERSION = 10401000; + CURRENT_PROJECT_VERSION = 10402000; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; From dfbbeb015c1ba5b8f3a693293a85a8f0f7fdd6cf Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sat, 11 Aug 2018 16:29:45 -0600 Subject: [PATCH 03/10] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=20Archive=20on=20al?= =?UTF-8?q?l=20builds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script/build b/script/build index 010638d62..ab0c674fd 100755 --- a/script/build +++ b/script/build @@ -16,9 +16,10 @@ main() { build # If this is a tagged build we are going to release - if [[ ! -z $TRAVIS_TAG ]]; then +# TEMP: Generate archive on all builds +# if [[ ! -z $TRAVIS_TAG ]]; then archive - fi +# fi } build() { From 7b3365860f516283d215ac467c6a3091538864f2 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sun, 29 Jul 2018 20:10:20 -0600 Subject: [PATCH 04/10] =?UTF-8?q?=F0=9F=90=9B=20Fix=20path=20to=20mas=20bi?= =?UTF-8?q?nary=20in=20package=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/package b/script/package index b6a9973f4..bc510fcec 100755 --- a/script/package +++ b/script/package @@ -13,7 +13,7 @@ echo "==> 🗜️ Compressing mas.xcarchive" zip -r mas.xcarchive.zip mas.xcarchive echo "==> ️🗜️ Compressing binary" -zip -j mas-cli.zip mas.xcarchive/Products/usr/local/bin/mas +zip -j mas-cli.zip mas.xcarchive/Products/build/mas echo -n "==> 🔢 SHA256: " shasum -a 256 mas-cli.zip From 0c975407a2334d9ed41e62066555549751c1f92a Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sat, 11 Aug 2018 17:06:38 -0600 Subject: [PATCH 05/10] =?UTF-8?q?=F0=9F=90=9B=20Fix=20account=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/AppStore/ISStoreAccount.swift | 23 ++++++++++++++++++++++- CHANGELOG.md | 1 + 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/App/AppStore/ISStoreAccount.swift b/App/AppStore/ISStoreAccount.swift index 7bf9a28c7..a53c8440b 100644 --- a/App/AppStore/ISStoreAccount.swift +++ b/App/AppStore/ISStoreAccount.swift @@ -12,7 +12,28 @@ extension ISStoreAccount { } static var primaryAccount: ISStoreAccount? { - return CKAccountStore.shared().primaryAccount + var account: ISStoreAccount? + + if #available(macOS 10.13, *) { + let group = DispatchGroup() + group.enter() + + let accountService: ISAccountService = ISServiceProxy.genericShared().accountService + accountService.primaryAccount { (storeAccount: ISStoreAccount) in + print(storeAccount) + account = storeAccount + + group.leave() + } + + let _ = group.wait(timeout: .now() + 30) + } else { + // macOS 10.9-10.12 + let accountStore = CKAccountStore.shared() + account = accountStore.primaryAccount + } + + return account } static func signIn(username: String, password: String, systemDialog: Bool = false) throws -> ISStoreAccount { diff --git a/CHANGELOG.md b/CHANGELOG.md index c8e1d2414..e49f4ac0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - ⛔ Disable `signin` command on macOS 10.13+ #162 - 🐛 Fix `signout` command #162 +- 🐛 Fix `account` command - ➖ CocoaSeeds #155 - ➕🍫 CocoaPods (1.5.3) #155 - 🛠 Xcode 9.4 #153 From a8884b5db7f03fbf7956162f9aac325968af12c5 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sat, 11 Aug 2018 17:08:43 -0600 Subject: [PATCH 06/10] =?UTF-8?q?=F0=9F=94=87=20Remove=20log=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/AppStore/ISStoreAccount.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/App/AppStore/ISStoreAccount.swift b/App/AppStore/ISStoreAccount.swift index a53c8440b..57f513e25 100644 --- a/App/AppStore/ISStoreAccount.swift +++ b/App/AppStore/ISStoreAccount.swift @@ -20,13 +20,11 @@ extension ISStoreAccount { let accountService: ISAccountService = ISServiceProxy.genericShared().accountService accountService.primaryAccount { (storeAccount: ISStoreAccount) in - print(storeAccount) account = storeAccount - group.leave() } - let _ = group.wait(timeout: .now() + 30) + _ = group.wait(timeout: .now() + 30) } else { // macOS 10.9-10.12 let accountStore = CKAccountStore.shared() From b9ab23868b094b9e245700ddcc35034b0602db5f Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sat, 11 Aug 2018 17:37:11 -0600 Subject: [PATCH 07/10] =?UTF-8?q?=F0=9F=93=9D=20Add=20--price=20flag=20to?= =?UTF-8?q?=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e49f4ac0f..76c164b29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,12 +14,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - ⛔ Disable `signin` command on macOS 10.13+ #162 - 🐛 Fix `signout` command #162 - 🐛 Fix `account` command +- ✨ Add price to `search` command when `--price` flag specified #62, #148 +- 🎨 `search` output formatted in columns #148 - ➖ CocoaSeeds #155 - ➕🍫 CocoaPods (1.5.3) #155 - 🛠 Xcode 9.4 #153 - 🛠 Xcode 9.3 #141 - 👷🏻‍♀️⚠️ Re-enable Danger #137 -- ✨ Add price to `search` command #62 ## [v1.4.1] Stop Littering - 2018-02-18 From 078d466acf011584247724d1b39ccfcff03c8d67 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sat, 11 Aug 2018 17:37:36 -0600 Subject: [PATCH 08/10] =?UTF-8?q?=F0=9F=93=9D=20Update=20readme=20with=20p?= =?UTF-8?q?rice=20and=20signin=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 150bb387d..760ddcf37 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,8 @@ applications and their product identifiers. 497799835 Xcode It is possible to search for applications by name using `mas search` which -will search the Mac App Store and return matching identifiers +will search the Mac App Store and return matching identifiers. +Include the `--price` flag to include prices in the result. $ mas search Xcode 497799835 Xcode @@ -41,7 +42,14 @@ application identifier: ==> Downloading PaintCode 2 ==> Installed PaintCode 2 -> Please note that this command will not allow you to install (or even purchase) an app for the first time: it must already be in the Purchased tab of the App Store. +If you want to install the first result that the `search` command returns, use the `lucky` command. + + $ mas lucky twitter + ==> Downloading Twitter + ==> Installed Twitter + +> Please note that this command will not allow you to install (or even purchase) an app for the first time: +it must already be in the Purchased tab of the App Store. Use `mas outdated` to list all applications with pending updates. @@ -49,13 +57,9 @@ Use `mas outdated` to list all applications with pending updates. 497799835 Xcode (7.0) 446107677 Screens VNC - Access Your Computer From Anywhere (3.6.7) - If you want to install the first result that the `search` command would prompt you: - - $ mas lucky twitter - ==> Downloading Twitter - ==> Installed Twitter - -> `mas` is only able to install/update applications that are listed in the Mac App Store itself. Use [`softwareupdate(8)`](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man8/softwareupdate.8.html) utility for downloading system updates (like iTunes, Xcode Command Line Tools, etc) +> `mas` is only able to install/update applications that are listed in the Mac App Store itself. +Use [`softwareupdate(8)`](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man8/softwareupdate.8.html) +utility for downloading system updates (like iTunes, Xcode Command Line Tools, etc) To install all pending updates run `mas upgrade`. @@ -76,16 +80,22 @@ Updates can be performed selectively by providing the app identifier(s) to ==> Downloading Xcode ==> Installed Xcode +### Signin + To sign into the Mac App Store for the first time run `mas signin`. $ mas signin mas@example.com ==> Signing in to Apple ID: mas@example.com Password: +> ⚠️ Due to breaking changes in the underlying API that mas uses to interact with the Mac App Store, +> the `signin` command has been temporarily disabled on macOS 10.13+ ⛔. +> For more information on this issue, see [#162](https://github.com/mas-cli/mas/pull/162). + If you experience issues signing in this way, you can ask to signin using a graphical dialog (provided by Mac App Store application): -> -> $ mas signin --dialog mas@example.com -> ==> Signing in to Apple ID: mas@example.com + + $ mas signin --dialog mas@example.com + ==> Signing in to Apple ID: mas@example.com You can also embed your password in the command. @@ -96,7 +106,9 @@ Use `mas signout` to sign out from the Mac App Store. ## Homebrew integration -`mas` is integrated with [homebrew-bundle](https://github.com/Homebrew/homebrew-bundle). If `mas` is installed, and you run `brew bundle dump`, then your Mac App Store apps will be included in the Brewfile created. See the [homebrew-bundle](https://github.com/Homebrew/homebrew-bundle) docs for more details. +`mas` is integrated with [homebrew-bundle](https://github.com/Homebrew/homebrew-bundle). If `mas` is installed, and you run `brew bundle dump`, +then your Mac App Store apps will be included in the Brewfile created. See the [homebrew-bundle](https://github.com/Homebrew/homebrew-bundle) +docs for more details. ## When something doesn't work From 83b90867794d22bdcf965320f04eb3fefdadc498 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sun, 12 Aug 2018 15:09:58 -0600 Subject: [PATCH 09/10] =?UTF-8?q?=F0=9F=94=97=20Update=20links=20to=20sign?= =?UTF-8?q?in=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/MASError.swift | 3 ++- README.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/App/MASError.swift b/App/MASError.swift index 5db9624d8..840e8c66d 100644 --- a/App/MASError.swift +++ b/App/MASError.swift @@ -29,8 +29,9 @@ enum MASError: Error, CustomStringConvertible { case .signInDisabled: return "The 'signin' command has been disabled on this macOS version. " + + "Please sign into the Mac App Store app manually." + "\nFor more info see: " + - "https://github.com/mas-cli/mas/pull/162" + "https://github.com/mas-cli/mas/issues/164" case .signInFailed(let error): if let error = error { diff --git a/README.md b/README.md index 760ddcf37..b3e1aea99 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ To sign into the Mac App Store for the first time run `mas signin`. > ⚠️ Due to breaking changes in the underlying API that mas uses to interact with the Mac App Store, > the `signin` command has been temporarily disabled on macOS 10.13+ ⛔. -> For more information on this issue, see [#162](https://github.com/mas-cli/mas/pull/162). +> For more information on this issue, see [#164](https://github.com/mas-cli/mas/issues/164). If you experience issues signing in this way, you can ask to signin using a graphical dialog (provided by Mac App Store application): From 082295152b4e9388e0588ac0bbfd63b985f400a2 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sun, 12 Aug 2018 15:10:16 -0600 Subject: [PATCH 10/10] =?UTF-8?q?=F0=9F=93=9D=20Changelog=20edits=20for=20?= =?UTF-8?q?release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76c164b29..40b7518c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,18 +9,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. -## [v1.4.2] - 2018-08-11 - -- ⛔ Disable `signin` command on macOS 10.13+ #162 -- 🐛 Fix `signout` command #162 -- 🐛 Fix `account` command -- ✨ Add price to `search` command when `--price` flag specified #62, #148 -- 🎨 `search` output formatted in columns #148 +## [v1.4.2] - 2018-08-12 + +- 🚏📥🙅🏻‍♀️ Disabled `signin` command on macOS 10.13+ #162 + - An error is immediately returned instead of crashing on newer macOS versions. + - See #164 for updates on this issue. +- 🐛 Fixed `signout` command #162 +- 🐛 Fixed `account` command #165 +- ✨ Added price to `search` command when `--price` flag specified #62, #148 +- 🎨 `search` output is now formatted in columns #148 - ➖ CocoaSeeds #155 - ➕🍫 CocoaPods (1.5.3) #155 - 🛠 Xcode 9.4 #153 - 🛠 Xcode 9.3 #141 -- 👷🏻‍♀️⚠️ Re-enable Danger #137 +- 👷🏻‍♀️⚠️ Re-enabled Danger #137 ## [v1.4.1] Stop Littering - 2018-02-18