Merge pull request #169 from SwiftGit2/feature/swift5.2

Updated to Swift 5.2 & Xcode 11.4
This commit is contained in:
Bilal Karim Reffas 2020-04-28 14:39:45 +02:00 committed by GitHub
commit c8a192f18b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 7 deletions

View File

@ -1,7 +1,7 @@
language: objective-c
os: osx
osx_image: xcode10.2
osx_image: xcode11.4
sudo: false # Enable container-based builds

View File

@ -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>

View File

@ -94,7 +94,7 @@ public struct Diff {
}
public let rawValue: UInt32
public static let binary = Flags(rawValue: 0)
public static let binary = Flags([])
public static let notBinary = Flags(rawValue: 1 << 0)
public static let validId = Flags(rawValue: 1 << 1)
public static let exists = Flags(rawValue: 1 << 2)

View File

@ -588,9 +588,10 @@ public final class Repository {
/// Stage the file(s) under the specified path.
public func add(path: String) -> Result<(), NSError> {
let dir = path
var dirPointer = UnsafeMutablePointer<Int8>(mutating: (dir as NSString).utf8String)
var paths = git_strarray(strings: &dirPointer, count: 1)
var dirPointer = UnsafeMutablePointer<Int8>(mutating: (path as NSString).utf8String)
var paths = withExtendedLifetime(&dirPointer) {
git_strarray(strings: $0, count: 1)
}
return unsafeIndex().flatMap { index in
defer { git_index_free(index) }
let addResult = git_index_add_all(index, &paths, 0, nil, nil)

View File

@ -69,8 +69,8 @@ elif [ "$SCHEME" == "SwiftGit2-iOS" ]; then
# "The requested device could not be found because no available devices matched the request."
# "The requested device could not be found because multiple devices matched the request."
SIMULATOR_NAME="Custom Simulator"
DEVICE_ID=com.apple.CoreSimulator.SimDeviceType.iPhone-5
RUNTIME_ID=com.apple.CoreSimulator.SimRuntime.iOS-10-2
DEVICE_ID=com.apple.CoreSimulator.SimDeviceType.iPhone-X
RUNTIME_ID=com.apple.CoreSimulator.SimRuntime.iOS-11-4
DESTINATION_ID=$(xcrun simctl create "$SIMULATOR_NAME" $DEVICE_ID $RUNTIME_ID)
echo "*** Building and testing $SCHEME..."