diff --git a/.gitignore b/.gitignore index 00f11e515..14e22d5be 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,8 @@ Seeds/**/Tests/ !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 diff --git a/.travis.yml b/.travis.yml index b573b2955..af0a416f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,14 @@ +# +# .travis.yml +# mas-cli +# +# https://travis-ci.org/mas-cli/mas +# https://docs.travis-ci.com/user/reference/osx/ +# + language: objective-c xcode_sdk: macosx10.13 -osx_image: xcode9.2 +osx_image: xcode9.3 env: global: diff --git a/App/Commands/Install.swift b/App/Commands/Install.swift index 5d3591e4a..553253287 100644 --- a/App/Commands/Install.swift +++ b/App/Commands/Install.swift @@ -13,7 +13,7 @@ struct InstallCommand: CommandProtocol { func run(_ options: Options) -> Result<(), MASError> { // Try to download applications with given identifiers and collect results - let downloadResults = options.appIds.flatMap { (appId) -> MASError? in + let downloadResults = options.appIds.compactMap { (appId) -> MASError? in if let product = installedApp(appId) , !options.forceInstall { printWarning("\(product.appName) is already installed") return nil diff --git a/App/Commands/Lucky.swift b/App/Commands/Lucky.swift index b2bc314c6..c139019d3 100644 --- a/App/Commands/Lucky.swift +++ b/App/Commands/Lucky.swift @@ -32,7 +32,7 @@ struct LuckyCommand: CommandProtocol { fileprivate func install(_ appId: UInt64, options: Options) -> Result<(), MASError> { // Try to download applications with given identifiers and collect results - let downloadResults = [appId].flatMap { (appId) -> MASError? in + let downloadResults = [appId].compactMap { (appId) -> MASError? in if let product = installedApp(appId) , !options.forceInstall { printWarning("\(product.appName) is already installed") return nil diff --git a/App/Commands/Upgrade.swift b/App/Commands/Upgrade.swift index 7c3693db1..75070438b 100644 --- a/App/Commands/Upgrade.swift +++ b/App/Commands/Upgrade.swift @@ -23,7 +23,7 @@ struct UpgradeCommand: CommandProtocol { let appIds: [UInt64] - appIds = apps.flatMap { + appIds = apps.compactMap { if let appId = UInt64($0) { return appId } @@ -35,7 +35,7 @@ struct UpgradeCommand: CommandProtocol { // check each of those for updates - updates = appIds.flatMap { + updates = appIds.compactMap { updateController?.availableUpdate(withItemIdentifier: $0) } @@ -56,7 +56,7 @@ struct UpgradeCommand: CommandProtocol { print("Upgrading \(updates.count) outdated application\(updates.count > 1 ? "s" : ""):") print(updates.map({ "\($0.title) (\($0.bundleVersion))" }).joined(separator: ", ")) - let updateResults = updates.flatMap { + let updateResults = updates.compactMap { download($0.itemIdentifier.uint64Value) } diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b7492144..1fc0bab83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +- 🛠 Xcode 9.3 #141 - 👷🏻‍♀️⚠️ Re-enable Danger #137 - ✨ Add price to search #62 diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index 6b6dac277..00ddb8de2 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -168,6 +168,8 @@ isa = PBXGroup; children = ( A49C8EB621015CD588C621FD /* Commandant */, + A96B40B5852A4F029AFDA669 /* Nimble */, + 6EB4B681BB79E32622860164 /* Quick */, 6569B225928F21A4A639BB22 /* Result */, ); name = Seeds; @@ -182,6 +184,13 @@ name = Result; sourceTree = ""; }; + 6EB4B681BB79E32622860164 /* Quick */ = { + isa = PBXGroup; + children = ( + ); + name = Quick; + sourceTree = ""; + }; A49C8EB621015CD588C621FD /* Commandant */ = { isa = PBXGroup; children = ( @@ -198,6 +207,13 @@ name = Commandant; sourceTree = ""; }; + A96B40B5852A4F029AFDA669 /* Nimble */ = { + isa = PBXGroup; + children = ( + ); + name = Nimble; + sourceTree = ""; + }; ED031A6F1B5127C00097692E = { isa = PBXGroup; children = ( @@ -378,7 +394,7 @@ attributes = { LastSwiftMigration = 0730; LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 0920; + LastUpgradeCheck = 0930; ORGANIZATIONNAME = "Andrew Naylor"; TargetAttributes = { ED031A771B5127C00097692E = { @@ -438,7 +454,6 @@ 4913269B1F48921D0010EB86 /* CKSoftwareMap+AppLookup.swift in Sources */, 0C47E694564FCB59996690DD /* Command.swift in Sources */, ED0F238B1B87569C00AE40CD /* Downloader.swift in Sources */, - ED0F238D1B8756E600AE40CD /* MASError.swift in Sources */, 3053D11E74A22A4C5A6BE833 /* Errors.swift in Sources */, EBD6B44FDF65E0253153629F /* HelpCommand.swift in Sources */, 900A1E811DBAC8CB0069B1A8 /* Info.swift in Sources */, @@ -447,6 +462,7 @@ ED0F23831B87533A00AE40CD /* List.swift in Sources */, 8078FAA81EC4F2FB004B5B3F /* Lucky.swift in Sources */, ED031A7C1B5127C00097692E /* main.swift in Sources */, + ED0F238D1B8756E600AE40CD /* MASError.swift in Sources */, 693A989B1CBFFAAA0004D3B4 /* NSURLSession+Synchronous.swift in Sources */, 30EA893640B02CCF679F9C57 /* Option.swift in Sources */, 92AE0FD7BE06D64692E6C1E6 /* OrderedSet.swift in Sources */, @@ -470,18 +486,18 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - F86588272030FAE70093DE57 /* MASError.swift in Sources */, 3F177C62A7053BA3ED415E5E /* Argument.swift in Sources */, 09A04CB22DC02B86AE4ACC8A /* ArgumentParser.swift in Sources */, 27340A5BB9F2A5B166E3A72A /* ArgumentProtocol.swift in Sources */, DE6E193A6671F3D6807F746D /* Command.swift in Sources */, 4C8321353B9AE40539A1AC8A /* Errors.swift in Sources */, F48562FA81B0C0258AC063B4 /* HelpCommand.swift in Sources */, + F86588272030FAE70093DE57 /* MASError.swift in Sources */, + F865880B2030F6DE0093DE57 /* MASErrorTestCase.swift in Sources */, F6D2058A70757D3477185A50 /* Option.swift in Sources */, 073998C12AE3BEEC41CE0DAD /* OrderedSet.swift in Sources */, C50DD25454FC5CAA1F37763F /* Result.swift in Sources */, EC113CE6C98E8D8358228D33 /* ResultProtocol.swift in Sources */, - F865880B2030F6DE0093DE57 /* MASErrorTestCase.swift in Sources */, 49C2F3FDD805256BE934A70E /* Switch.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -509,12 +525,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -555,7 +573,7 @@ ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.mphys.mas-cli"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -572,12 +590,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -610,7 +630,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.9; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.mphys.mas-cli"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; @@ -621,7 +641,6 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.mphys.mas-cli"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "App/mas-cli-Bridging-Header.h"; - SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -633,7 +652,6 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "App/mas-cli-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/mas-cli.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mas-cli.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/mas-cli.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/mas-cli.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mas-cli.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..3ddf867a1 --- /dev/null +++ b/mas-cli.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + BuildSystemType + Latest + + diff --git a/mas-cli.xcodeproj/xcshareddata/xcschemes/mas-cli Debug.xcscheme b/mas-cli.xcodeproj/xcshareddata/xcschemes/mas-cli Debug.xcscheme index 155305474..14d43d229 100644 --- a/mas-cli.xcodeproj/xcshareddata/xcschemes/mas-cli Debug.xcscheme +++ b/mas-cli.xcodeproj/xcshareddata/xcschemes/mas-cli Debug.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -57,7 +56,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "1" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/mas-cli.xcodeproj/xcshareddata/xcschemes/mas-cli Release.xcscheme b/mas-cli.xcodeproj/xcshareddata/xcschemes/mas-cli Release.xcscheme index 5afb971d8..d0dd1a3d9 100644 --- a/mas-cli.xcodeproj/xcshareddata/xcschemes/mas-cli Release.xcscheme +++ b/mas-cli.xcodeproj/xcshareddata/xcschemes/mas-cli Release.xcscheme @@ -1,6 +1,6 @@ + + + + diff --git a/mas-cli.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mas-cli.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/mas-cli.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/mas-cli.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mas-cli.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..3ddf867a1 --- /dev/null +++ b/mas-cli.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + BuildSystemType + Latest + +