mirror of
https://github.com/gosticks/SwiftGit2.git
synced 2025-10-16 11:55:34 +00:00
Migrate all targets to Swift 4.2
This commit is contained in:
parent
f811db8047
commit
e65206c00c
@ -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;
|
||||
};
|
||||
|
||||
@ -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)})
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user