From 0cb2f8acc580f153403f9aa910d7438dd6975383 Mon Sep 17 00:00:00 2001 From: Matt Rubin Date: Thu, 11 Apr 2019 19:14:04 -0400 Subject: [PATCH 1/8] Upgrade Result to the latest version --- Cartfile | 2 +- Cartfile.resolved | 2 +- Carthage/Checkouts/Result | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cartfile b/Cartfile index 32a661f..e9bc3ad 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "antitypical/Result" ~> 3.0 +github "antitypical/Result" ~> 4.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index 6131837..78b449a 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,5 +1,5 @@ github "Quick/Nimble" "v7.0.3" github "Quick/Quick" "v1.2.0" github "ZipArchive/ZipArchive" "v1.8.1" -github "antitypical/Result" "3.2.4" +github "antitypical/Result" "4.1.0" github "jspahrsummers/xcconfigs" "0.10" diff --git a/Carthage/Checkouts/Result b/Carthage/Checkouts/Result index 7477584..2ca499b 160000 --- a/Carthage/Checkouts/Result +++ b/Carthage/Checkouts/Result @@ -1 +1 @@ -Subproject commit 7477584259bfce2560a19e06ad9f71db441fff11 +Subproject commit 2ca499ba456795616fbc471561ff1d963e6ae160 From 74fe90393f98c09e0f5fe214d1e7978d5c609a95 Mon Sep 17 00:00:00 2001 From: Matt Rubin Date: Thu, 11 Apr 2019 19:16:51 -0400 Subject: [PATCH 2/8] Upgrade Quick and Nimble to the latest versions --- Cartfile.private | 4 ++-- Cartfile.resolved | 4 ++-- Carthage/Checkouts/Nimble | 2 +- Carthage/Checkouts/Quick | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cartfile.private b/Cartfile.private index 8c4fe0d..7d091c8 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1,4 +1,4 @@ github "jspahrsummers/xcconfigs" >= 0.10 -github "Quick/Quick" ~> 1.0 -github "Quick/Nimble" ~> 7.0 +github "Quick/Quick" ~> 2.0 +github "Quick/Nimble" ~> 8.0 github "ZipArchive/ZipArchive" ~> 1.6 diff --git a/Cartfile.resolved b/Cartfile.resolved index 78b449a..6dec325 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,5 +1,5 @@ -github "Quick/Nimble" "v7.0.3" -github "Quick/Quick" "v1.2.0" +github "Quick/Nimble" "v8.0.1" +github "Quick/Quick" "v2.0.0" github "ZipArchive/ZipArchive" "v1.8.1" github "antitypical/Result" "4.1.0" github "jspahrsummers/xcconfigs" "0.10" diff --git a/Carthage/Checkouts/Nimble b/Carthage/Checkouts/Nimble index 22800b0..43304bf 160000 --- a/Carthage/Checkouts/Nimble +++ b/Carthage/Checkouts/Nimble @@ -1 +1 @@ -Subproject commit 22800b0954c89344bb8c87f8ab93378076716fb7 +Subproject commit 43304bf2b1579fd555f2fdd51742771c1e4f2b98 diff --git a/Carthage/Checkouts/Quick b/Carthage/Checkouts/Quick index 0ff81f2..0b4ed6c 160000 --- a/Carthage/Checkouts/Quick +++ b/Carthage/Checkouts/Quick @@ -1 +1 @@ -Subproject commit 0ff81f2c665b4381f526bd656f8708dd52a9ea2f +Subproject commit 0b4ed6c706dd0cce923b5019a605a9bcc6b1b600 From 8087272bc25fa1c2962ab0d0000c6352e47cb099 Mon Sep 17 00:00:00 2001 From: Matt Rubin Date: Thu, 11 Apr 2019 19:22:53 -0400 Subject: [PATCH 3/8] Upgrade ZipArchive to the latest version --- Cartfile.private | 2 +- Cartfile.resolved | 2 +- Carthage/Checkouts/ZipArchive | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cartfile.private b/Cartfile.private index 7d091c8..0cefcfb 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1,4 +1,4 @@ github "jspahrsummers/xcconfigs" >= 0.10 github "Quick/Quick" ~> 2.0 github "Quick/Nimble" ~> 8.0 -github "ZipArchive/ZipArchive" ~> 1.6 +github "ZipArchive/ZipArchive" ~> 2.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index 6dec325..af462bd 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,5 +1,5 @@ github "Quick/Nimble" "v8.0.1" github "Quick/Quick" "v2.0.0" -github "ZipArchive/ZipArchive" "v1.8.1" +github "ZipArchive/ZipArchive" "v2.1.5" github "antitypical/Result" "4.1.0" github "jspahrsummers/xcconfigs" "0.10" diff --git a/Carthage/Checkouts/ZipArchive b/Carthage/Checkouts/ZipArchive index 92f3cac..6017bab 160000 --- a/Carthage/Checkouts/ZipArchive +++ b/Carthage/Checkouts/ZipArchive @@ -1 +1 @@ -Subproject commit 92f3cac49f7b70fc1466d681ac0e13ff91cf7898 +Subproject commit 6017baba3cd7f5563a23aee865d08bc26e338bd1 From f811db8047effa16679037fa98e23973143ab2b7 Mon Sep 17 00:00:00 2001 From: Matt Rubin Date: Thu, 11 Apr 2019 19:33:56 -0400 Subject: [PATCH 4/8] Bump the macOS tests deployment target to match the Nimble dependency --- SwiftGit2.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SwiftGit2.xcodeproj/project.pbxproj b/SwiftGit2.xcodeproj/project.pbxproj index 76f2dcb..44304c1 100644 --- a/SwiftGit2.xcodeproj/project.pbxproj +++ b/SwiftGit2.xcodeproj/project.pbxproj @@ -1065,6 +1065,7 @@ baseConfigurationReference = BEB31F531A0D75EE00F525B9 /* Mac-Application.xcconfig */; buildSettings = { INFOPLIST_FILE = SwiftGit2Tests/Info.plist; + MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -1075,6 +1076,7 @@ baseConfigurationReference = BEB31F531A0D75EE00F525B9 /* Mac-Application.xcconfig */; buildSettings = { INFOPLIST_FILE = SwiftGit2Tests/Info.plist; + MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; From e65206c00c3b471b862b22a09c7cdfc15af9fe8c Mon Sep 17 00:00:00 2001 From: Matt Rubin Date: Thu, 11 Apr 2019 19:39:16 -0400 Subject: [PATCH 5/8] Migrate all targets to Swift 4.2 --- SwiftGit2.xcodeproj/project.pbxproj | 14 ++++++-------- SwiftGit2Tests/RepositorySpec.swift | 8 +++++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/SwiftGit2.xcodeproj/project.pbxproj b/SwiftGit2.xcodeproj/project.pbxproj index 44304c1..ab9cd09 100644 --- a/SwiftGit2.xcodeproj/project.pbxproj +++ b/SwiftGit2.xcodeproj/project.pbxproj @@ -601,18 +601,18 @@ ORGANIZATIONNAME = "GitHub, Inc"; TargetAttributes = { 621E66611C72958800A0F352 = { - LastSwiftMigration = 0810; + LastSwiftMigration = 1010; }; 621E66B61C72958D00A0F352 = { - LastSwiftMigration = 0810; + LastSwiftMigration = 1010; }; BEB31F221A0D6F7A00F525B9 = { CreatedOnToolsVersion = 6.1; - LastSwiftMigration = 0810; + LastSwiftMigration = 1010; }; BEB31F2D1A0D6F7A00F525B9 = { CreatedOnToolsVersion = 6.1; - LastSwiftMigration = 0810; + LastSwiftMigration = 1010; }; BEB31F8E1A0E563900F525B9 = { CreatedOnToolsVersion = 6.1; @@ -983,7 +983,7 @@ INSTALL_OWNER = ""; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACOSX_DEPLOYMENT_TARGET = 10.9; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -998,7 +998,7 @@ INSTALL_OWNER = ""; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACOSX_DEPLOYMENT_TARGET = 10.9; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -1027,7 +1027,6 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = SwiftGit2; SWIFT_INCLUDE_PATHS = "$(SRCROOT)/libgit2"; - SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -1056,7 +1055,6 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = SwiftGit2; SWIFT_INCLUDE_PATHS = "$(SRCROOT)/libgit2"; - SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/SwiftGit2Tests/RepositorySpec.swift b/SwiftGit2Tests/RepositorySpec.swift index 081ed64..ee1855c 100644 --- a/SwiftGit2Tests/RepositorySpec.swift +++ b/SwiftGit2Tests/RepositorySpec.swift @@ -59,7 +59,7 @@ class RepositorySpec: QuickSpec { try! FileManager.default.createDirectory( at: localURL, withIntermediateDirectories: true, - attributes: nonReadablePermissions) + attributes: convertToOptionalFileAttributeKeyDictionary(nonReadablePermissions)) let result = Repository.isValid(url: localURL) expect(result.value).to(beNil()) @@ -969,3 +969,9 @@ class RepositorySpec: QuickSpec { return URL(fileURLWithPath: path) } } + +// Helper function inserted by Swift 4.2 migrator. +fileprivate func convertToOptionalFileAttributeKeyDictionary(_ input: [String: Any]?) -> [FileAttributeKey: Any]? { + guard let input = input else { return nil } + return Dictionary(uniqueKeysWithValues: input.map { key, value in (FileAttributeKey(rawValue: key), value)}) +} From 310e7a4167b2f9dd5641a1217404db1865ee0f5f Mon Sep 17 00:00:00 2001 From: Matt Rubin Date: Thu, 11 Apr 2019 19:45:34 -0400 Subject: [PATCH 6/8] Remove the migrator-added helper function from the file permissions test --- SwiftGit2Tests/RepositorySpec.swift | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/SwiftGit2Tests/RepositorySpec.swift b/SwiftGit2Tests/RepositorySpec.swift index ee1855c..d021f45 100644 --- a/SwiftGit2Tests/RepositorySpec.swift +++ b/SwiftGit2Tests/RepositorySpec.swift @@ -55,11 +55,11 @@ class RepositorySpec: QuickSpec { it("should return error if .git is not readable") { let localURL = self.temporaryURL(forPurpose: "git-isValid-unreadable").appendingPathComponent(".git") - let nonReadablePermissions: [String: Any] = [FileAttributeKey.posixPermissions.rawValue: 0o077] + let nonReadablePermissions: [FileAttributeKey: Any] = [.posixPermissions: 0o077] try! FileManager.default.createDirectory( at: localURL, withIntermediateDirectories: true, - attributes: convertToOptionalFileAttributeKeyDictionary(nonReadablePermissions)) + attributes: nonReadablePermissions) let result = Repository.isValid(url: localURL) expect(result.value).to(beNil()) @@ -969,9 +969,3 @@ class RepositorySpec: QuickSpec { return URL(fileURLWithPath: path) } } - -// Helper function inserted by Swift 4.2 migrator. -fileprivate func convertToOptionalFileAttributeKeyDictionary(_ input: [String: Any]?) -> [FileAttributeKey: Any]? { - guard let input = input else { return nil } - return Dictionary(uniqueKeysWithValues: input.map { key, value in (FileAttributeKey(rawValue: key), value)}) -} From ef9a46c86b19f57869914d303c6142ad35e5b65f Mon Sep 17 00:00:00 2001 From: Matt Rubin Date: Thu, 11 Apr 2019 19:55:34 -0400 Subject: [PATCH 7/8] Upgrade xcconfigs to include Xcode 10.1's recommended build settings --- Cartfile.private | 2 +- Cartfile.resolved | 2 +- Carthage/Checkouts/xcconfigs | 2 +- SwiftGit2.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/SwiftGit2-OSX.xcscheme | 2 +- .../xcshareddata/xcschemes/SwiftGit2-iOS.xcscheme | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cartfile.private b/Cartfile.private index 0cefcfb..da3abe3 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1,4 +1,4 @@ -github "jspahrsummers/xcconfigs" >= 0.10 +github "jspahrsummers/xcconfigs" ~> 0.12 github "Quick/Quick" ~> 2.0 github "Quick/Nimble" ~> 8.0 github "ZipArchive/ZipArchive" ~> 2.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index af462bd..6df61af 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -2,4 +2,4 @@ github "Quick/Nimble" "v8.0.1" github "Quick/Quick" "v2.0.0" github "ZipArchive/ZipArchive" "v2.1.5" github "antitypical/Result" "4.1.0" -github "jspahrsummers/xcconfigs" "0.10" +github "jspahrsummers/xcconfigs" "0.12" diff --git a/Carthage/Checkouts/xcconfigs b/Carthage/Checkouts/xcconfigs index cc451b0..bb79555 160000 --- a/Carthage/Checkouts/xcconfigs +++ b/Carthage/Checkouts/xcconfigs @@ -1 +1 @@ -Subproject commit cc451b08e052b6146f5caf66bc1120420c529c7b +Subproject commit bb795558a76e5daf3688500055bbcfe243bffa8d diff --git a/SwiftGit2.xcodeproj/project.pbxproj b/SwiftGit2.xcodeproj/project.pbxproj index ab9cd09..20af11b 100644 --- a/SwiftGit2.xcodeproj/project.pbxproj +++ b/SwiftGit2.xcodeproj/project.pbxproj @@ -597,7 +597,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0810; + LastUpgradeCheck = 1010; ORGANIZATIONNAME = "GitHub, Inc"; TargetAttributes = { 621E66611C72958800A0F352 = { diff --git a/SwiftGit2.xcodeproj/xcshareddata/xcschemes/SwiftGit2-OSX.xcscheme b/SwiftGit2.xcodeproj/xcshareddata/xcschemes/SwiftGit2-OSX.xcscheme index ff804bf..0d9a6bf 100644 --- a/SwiftGit2.xcodeproj/xcshareddata/xcschemes/SwiftGit2-OSX.xcscheme +++ b/SwiftGit2.xcodeproj/xcshareddata/xcschemes/SwiftGit2-OSX.xcscheme @@ -1,6 +1,6 @@ Date: Thu, 11 Apr 2019 20:20:50 -0400 Subject: [PATCH 8/8] Configure Travis CI to build with Xcode 10.1 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fca5353..74a8275 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: objective-c os: osx -osx_image: xcode9.3 +osx_image: xcode10.1 sudo: false # Enable container-based builds