Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonnam committed Jun 17, 2018
2 parents 2488d01 + 0d3d2d3 commit e7e27b6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"repositoryURL": "https://github.com/jasonnam/PathFinder",
"state": {
"branch": "develop",
"revision": "e49ff5b7cc5f30c007fd83557f3d9215051dc211",
"revision": "beb4667afc6e3d65872d9e9416ec916107641f8a",
"version": null
}
},
Expand Down
26 changes: 13 additions & 13 deletions Sources/Flint/spark/sparkCommandHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ let sparkCommandHandler: CommandHandler = { _, _, operandValues, optionValues in
do {
let templateFilesPath = template.templateFilesPath
enumerationLoop: for content in try templateFilesPath.enumerated() {
if content.isDirectory {
continue
}

let relativeRawPath = String(content.path.dropFirst(templateFilesPath.path.count + 1))

if verbose {
Expand Down Expand Up @@ -202,16 +198,20 @@ let sparkCommandHandler: CommandHandler = { _, _, operandValues, optionValues in
try contentOutputPath.parent.createDirectory()
}

var encoding = String.Encoding.utf8
if let dataString = try? String(contentsOfFile: content.path, usedEncoding: &encoding) {
let processedString = process(dataString,
variables: template.manifest.variables ?? [],
inputs: inputs)
try processedString.write(toFile: contentOutputPath.path,
atomically: true,
encoding: encoding)
if content.isDirectory {
try contentOutputPath.createDirectory()
} else {
try content.copy(to: contentOutputPath)
var encoding = String.Encoding.utf8
if let dataString = try? String(contentsOfFile: content.path, usedEncoding: &encoding) {
let processedString = process(dataString,
variables: template.manifest.variables ?? [],
inputs: inputs)
try processedString.write(toFile: contentOutputPath.path,
atomically: true,
encoding: encoding)
} else {
try content.copy(to: contentOutputPath)
}
}
}
} catch {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Flint/version/version.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@

import Foundation

let version = "0.1.3"
let version = "0.1.4"
2 changes: 1 addition & 1 deletion Version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.3
0.1.4

0 comments on commit e7e27b6

Please sign in to comment.