Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion App/Commands/Install.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion App/Commands/Lucky.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions App/Commands/Upgrade.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct UpgradeCommand: CommandProtocol {

let appIds: [UInt64]

appIds = apps.flatMap {
appIds = apps.compactMap {
if let appId = UInt64($0) {
return appId
}
Expand All @@ -35,7 +35,7 @@ struct UpgradeCommand: CommandProtocol {

// check each of those for updates

updates = appIds.flatMap {
updates = appIds.compactMap {
updateController?.availableUpdate(withItemIdentifier: $0)
}

Expand All @@ -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)
}

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
34 changes: 26 additions & 8 deletions mas-cli.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@
isa = PBXGroup;
children = (
A49C8EB621015CD588C621FD /* Commandant */,
A96B40B5852A4F029AFDA669 /* Nimble */,
6EB4B681BB79E32622860164 /* Quick */,
6569B225928F21A4A639BB22 /* Result */,
);
name = Seeds;
Expand All @@ -182,6 +184,13 @@
name = Result;
sourceTree = "<group>";
};
6EB4B681BB79E32622860164 /* Quick */ = {
isa = PBXGroup;
children = (
);
name = Quick;
sourceTree = "<group>";
};
A49C8EB621015CD588C621FD /* Commandant */ = {
isa = PBXGroup;
children = (
Expand All @@ -198,6 +207,13 @@
name = Commandant;
sourceTree = "<group>";
};
A96B40B5852A4F029AFDA669 /* Nimble */ = {
isa = PBXGroup;
children = (
);
name = Nimble;
sourceTree = "<group>";
};
ED031A6F1B5127C00097692E = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -378,7 +394,7 @@
attributes = {
LastSwiftMigration = 0730;
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Andrew Naylor";
TargetAttributes = {
ED031A771B5127C00097692E = {
Expand Down Expand Up @@ -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 */,
Expand All @@ -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 */,
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
};
Expand All @@ -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;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Latest</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,9 +26,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
Expand Down Expand Up @@ -57,7 +56,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "1"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -56,7 +55,6 @@
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "1"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
7 changes: 7 additions & 0 deletions mas-cli.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions mas-cli.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
8 changes: 8 additions & 0 deletions mas-cli.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Latest</string>
</dict>
</plist>