Skip to content

Commit

Permalink
Updated version latest to only rewrite Package.swift once
Browse files Browse the repository at this point in the history
  • Loading branch information
calebkleveter committed Jun 2, 2017
1 parent 9ccb00a commit 6828d3e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sources/Ether/VersionLatest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ public final class VersionLatest: Command {

if replaceRegex.matches(in: mutableString as String, options: [], range: NSMakeRange(0, mutableString.length)).count == 0 { throw fail(bar: updateBar, with: "Error in Regex pattern") }
replaceRegex.replaceMatches(in: mutableString, options: [], range: NSMakeRange(0, mutableString.length), withTemplate: "$1\(formattedVersion)$3")

try (mutableString as String).data(using: .utf8)?.write(to: URL(string: "file:\(manager.currentDirectoryPath)/Package.swift")!)
}
try (mutableString as String).data(using: .utf8)?.write(to: URL(string: "file:\(manager.currentDirectoryPath)/Package.swift")!)

updateBar.finish()
}
Expand Down

0 comments on commit 6828d3e

Please sign in to comment.