Skip to content

Commit

Permalink
Merge pull request SwiftGit2#169 from SwiftGit2/feature/swift5.2
Browse files Browse the repository at this point in the history
Updated to Swift 5.2 & Xcode 11.4
  • Loading branch information
BilalReffas authored Apr 28, 2020
2 parents c5cbf4c + e7656b1 commit c8a192f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: objective-c

os: osx
osx_image: xcode10.2
osx_image: xcode11.4

sudo: false # Enable container-based builds

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>
2 changes: 1 addition & 1 deletion SwiftGit2/Diffs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 4 additions & 3 deletions SwiftGit2/Repository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions script/cibuild
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down

0 comments on commit c8a192f

Please sign in to comment.