Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
Update for Xcode 7.0.1 GM.
Browse files Browse the repository at this point in the history
Updated version to 0.2.2 and fixed compiler errors for Xcode 7 GM.
  • Loading branch information
owensd committed Oct 19, 2015
1 parent 987d92b commit f5879cb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Tools.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func runTask(launchPath: String, args: [String] = [], outputToStandardOut: Bool
}

let replaced = process(str) { (inout string: String, range: Range<String.Index>) in
string.replaceRange(range.startIndex ..< advance(range.startIndex, 2), with: "\\e")
string.replaceRange(range.startIndex ..< range.startIndex.advancedBy(2), with: "\\e")
}

let stripped = process(str) { (inout string: String, range: Range<String.Index>) in
Expand Down
11 changes: 11 additions & 0 deletions src/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@

import Foundation

public extension String {
public var pathExtension: String { return (self as NSString).pathExtension }
public var lastPathComponent: String { return (self as NSString).lastPathComponent }
public var stringByDeletingLastPathComponent: String { return (self as NSString).stringByDeletingLastPathComponent }

public var pathComponents: [String] { return (self as NSString).pathComponents }
public func stringByAppendingPathComponent(str: String) -> String {
return (self as NSString).stringByAppendingPathComponent(str)
}
}

/// Returns the root path that contains the script(s).
func canonicalPath(path: String) throws -> String {
guard let cpath = path.cStringUsingEncoding(NSUTF8StringEncoding) else { throw ErrorCode.PathNotFound }
Expand Down
2 changes: 1 addition & 1 deletion src/version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

VERSION=0.2.0
VERSION=0.2.2
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
VERSION_FILE=VersionInfo.swift

Expand Down

0 comments on commit f5879cb

Please sign in to comment.