Clean up print statements
diff --git a/.gitignore b/.gitignore
index 86f21d8..7fc31d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,3 +58,7 @@
# https://github.com/johnno1962/injectionforxcode
iOSInjectionProject/
+
+#Lib we don't want to distribute
+**/SSZipArchive
+**/ZipArchive
diff --git a/WhiskSwiftTools/Git.swift b/WhiskSwiftTools/Git.swift
index 868b5f0..b1dab3f 100644
--- a/WhiskSwiftTools/Git.swift
+++ b/WhiskSwiftTools/Git.swift
@@ -36,7 +36,7 @@
if (error == nil) {
// Success
let statusCode = (response as! HTTPURLResponse).statusCode
- print("Cloning Git Status Code: \(statusCode)")
+ print("Repo \(repo) successfully cloned with status code: \(statusCode)")
// This is your file-variable:
// data
@@ -53,13 +53,15 @@
try fileManager.removeItem(atPath: zipPath)
} catch {
- print("Error processing zip file at \(zipPath)")
+ print("Error extracting zip file at \(zipPath)")
}
+ } else {
+ print("Failure when cloning repo \(repo). Response has no data.")
}
} else {
// Failure
- print("Faulure: %@", error?.localizedDescription);
+ print("Failure cloning \(repo): %@", error?.localizedDescription);
}
group.leave()
diff --git a/WhiskSwiftTools/ProjectManager.swift b/WhiskSwiftTools/ProjectManager.swift
index 651d9f5..3f49d0a 100644
--- a/WhiskSwiftTools/ProjectManager.swift
+++ b/WhiskSwiftTools/ProjectManager.swift
@@ -52,7 +52,7 @@
try self.projectReader?.readRootDependencies(clone: true)
try self.projectReader?.readProjectDirectory()
- self.projectReader?.dumpProjectStructure()
+ //self.projectReader?.dumpProjectStructure()
try self.installPackages()
try self.installTriggers()
@@ -63,7 +63,7 @@
group.leave()
} catch {
- print("Error \(error)")
+ print("Error deploying project \(error)")
}
}
@@ -94,7 +94,7 @@
try self.projectReader?.readRootDependencies(clone: false)
try self.projectReader?.readProjectDirectory()
- self.projectReader?.dumpProjectStructure()
+ // self.projectReader?.dumpProjectStructure()
try self.deleteRules()
try self.deleteActionsAndSequences()
@@ -105,7 +105,7 @@
group.leave()
} catch {
- print("Error \(error)")
+ print("Error deleting project \(error)")
}
}
@@ -134,7 +134,7 @@
switch group.wait(timeout: DispatchTime.distantFuture) {
case DispatchTimeoutResult.Success:
- print("Install sequence success")
+ print("Sequences installed successfully")
break
case DispatchTimeoutResult.TimedOut:
print("Install sequence timed out")
@@ -154,7 +154,7 @@
switch group.wait(timeout: DispatchTime.distantFuture) {
case DispatchTimeoutResult.Success:
- print("Install packages success")
+ print("Packages installed successfully")
break
case DispatchTimeoutResult.TimedOut:
print("Install pacakges timed out")
@@ -176,7 +176,7 @@
switch group.wait(timeout: DispatchTime.distantFuture) {
case DispatchTimeoutResult.Success:
- print("delete packages success")
+ print("Packages deleted successfully")
break
case DispatchTimeoutResult.TimedOut:
print("delete packages timed out")
@@ -197,7 +197,7 @@
switch group.wait(timeout: DispatchTime.distantFuture) {
case DispatchTimeoutResult.Success:
- print("Install rules success")
+ print("Rules installed successfully")
break
case DispatchTimeoutResult.TimedOut:
print("Install rules timed out")
@@ -219,7 +219,7 @@
switch group.wait(timeout: DispatchTime.distantFuture) {
case DispatchTimeoutResult.Success:
- print("enable success")
+ print("Rules enabled successfully")
break
case DispatchTimeoutResult.TimedOut:
print("enable timed out")
@@ -243,7 +243,7 @@
switch group.wait(timeout: DispatchTime.distantFuture) {
case DispatchTimeoutResult.Success:
- print("delete rules success")
+ print("Rules deleted successfully")
break
case DispatchTimeoutResult.TimedOut:
print("delete rules timed out")
@@ -269,7 +269,7 @@
switch group.wait(timeout: DispatchTime.distantFuture) {
case DispatchTimeoutResult.Success:
- print("install triggers success")
+ print("Triggers installed successfully")
break
case DispatchTimeoutResult.TimedOut:
print("install timed out")
@@ -290,7 +290,7 @@
switch group.wait(timeout: DispatchTime.distantFuture) {
case DispatchTimeoutResult.Success:
- print("delete triggers success")
+ print("Triggers deleted successfully success")
break
case DispatchTimeoutResult.TimedOut:
print("delete triggers timed out")
@@ -335,7 +335,7 @@
switch group.wait(timeout: DispatchTime.distantFuture) {
case DispatchTimeoutResult.Success:
- print("Install actions success")
+ print("Actions installed sucessfully")
break
case DispatchTimeoutResult.TimedOut:
print("Install actions timed out")
@@ -360,7 +360,7 @@
switch group.wait(timeout: DispatchTime.distantFuture) {
case DispatchTimeoutResult.Success:
- print("delete actions and sequences success")
+ print("Actions and sequences deleted successfully")
break
case DispatchTimeoutResult.TimedOut:
print("delete actions and sequences timed out")
diff --git a/WhiskSwiftTools/ProjectReader.swift b/WhiskSwiftTools/ProjectReader.swift
index ededfac..7ef3c77 100644
--- a/WhiskSwiftTools/ProjectReader.swift
+++ b/WhiskSwiftTools/ProjectReader.swift
@@ -111,12 +111,10 @@
switch group.wait(timeout: DispatchTime.distantFuture) {
case DispatchTimeoutResult.Success:
- print("Cloning project repo success")
let projectName = (repo as NSString).lastPathComponent
projectPath = "\(path)/\(projectName)-\(release)/src"
break
case DispatchTimeoutResult.TimedOut:
- print("Cloning project repo timed out")
throw WhiskProjectError.GitRequestError(cause: "Failure cloning repo \(repo): request timed out.")
}
@@ -129,8 +127,6 @@
} else {
projectPath = path
}
-
- print("Project path \(projectPath!)")
}
public func dumpProjectStructure() {
@@ -238,13 +234,11 @@
switch group.wait(timeout: DispatchTime.distantFuture) {
case DispatchTimeoutResult.Success:
- print("Clone repo \(dependency.url) success")
let packagePath = (name as String)+"-"+(dependency.version as String)
let depPath = projectPath+"/Packages/"+packagePath+"/src"
try readDirectory(dirPath: depPath, isDependency: true)
break
case DispatchTimeoutResult.TimedOut:
- print("Clone \(dependency.url) timed out")
break
}
@@ -255,7 +249,6 @@
let fileManager = FileManager.default
if let enumerator: FileManager.DirectoryEnumerator = fileManager.enumerator(atPath: path) {
while let item = enumerator.nextObject() as? NSString {
- print("Inspecting \(item)")
if item.pathComponents.count == 1 {
if item.pathExtension == "xcodeproj" {
return true
diff --git a/WhiskSwiftTools/WhiskAPI.swift b/WhiskSwiftTools/WhiskAPI.swift
index c3ff5b4..402db83 100644
--- a/WhiskSwiftTools/WhiskAPI.swift
+++ b/WhiskSwiftTools/WhiskAPI.swift
@@ -192,8 +192,6 @@
if let error = error {
print("Error creating trigger \(name) for feed \(trigger.feed), error: \(error)")
} else {
- print("Setting up feed for trigger \(name): \(response)")
-
group.enter()
//DispatchQueue.main.after(when: DispatchTime.now() + 0.5) {
@@ -226,8 +224,6 @@
if let error = error {
print("Error creating feed for trigger \(name), error: \(error)")
- } else {
- print("Success creating feed \(name), \(response)")
}
}
@@ -412,8 +408,6 @@
print("Error deleting trigger \(name), \(error)")
} else if let response = response {
- print("Got response from deleting trigger \(response)")
-
if let annotations = response["annotations"] as? [[String:AnyObject]] {
for note in annotations {
@@ -440,7 +434,6 @@
}
}
- print("Got annotation \(note)")
}
}
@@ -484,7 +477,6 @@
if let error = error {
print("Error disabling rule \(name), error: \(error)")
} else {
- print("Disable response for rule \(name): \(response)")
group.enter()
//DispatchQueue.main.after(when: DispatchTime.now() + 0.5) {
@@ -539,7 +531,6 @@
if let parameters = parameters {
request.httpBody = try JSONSerialization.data(withJSONObject: parameters as AnyObject, options: JSONSerialization.WritingOptions())
- print("Sending body \(request.httpBody)")
}
let task = urlSession.dataTask(with: request) {
@@ -553,8 +544,6 @@
}
if let error = error {
- print("Error performing network call \(error), status: \(statusCode)")
-
if let callback = callback {
callback(response: nil, error: error)
} else {
@@ -562,8 +551,6 @@
}
} else {
- print("Success calling PUT \(url), status:\(statusCode)")
-
if let callback = callback {
callback(response: ["status":statusCode, "msg":"PUT call success"], error: nil)
}
@@ -609,7 +596,6 @@
return
} else {
- print("Success calling DELETE \(url), status:\(statusCode)")
}
@@ -674,7 +660,6 @@
return
} else {
- print("Success calling POST \(url), status:\(statusCode)")
callback(response: ["status":statusCode, "description":"Post call success"], error: nil)
}
diff --git a/WhiskSwiftTools/WhiskInstaller.swift b/WhiskSwiftTools/WhiskInstaller.swift
index 1c77fff..c91cc60 100644
--- a/WhiskSwiftTools/WhiskInstaller.swift
+++ b/WhiskSwiftTools/WhiskInstaller.swift
@@ -34,13 +34,8 @@
let skipDashIndex = argument.index(argument.startIndex, offsetBy: offset)
let (option, value) = consoleIO.getOption(option: argument.substring(from: skipDashIndex))
- print("Argc: \(argCount) Option \(option) value: \(value)")
- print("Current directory is \(getCurrentDirectory())")
-
switch option {
case .Build:
- print("Gonna build this mother")
-
do {
if let pm = try setupProjectManager() {
try pm.deployProject()
diff --git a/WhiskSwiftTools/WhiskTokenizer.swift b/WhiskSwiftTools/WhiskTokenizer.swift
index 428ca9e..c4a75a1 100644
--- a/WhiskSwiftTools/WhiskTokenizer.swift
+++ b/WhiskSwiftTools/WhiskTokenizer.swift
@@ -63,7 +63,6 @@
let fileStr = try String(contentsOfFile: fullPath)
if let actionArray = getActions(str: fileStr) {
for action in actionArray {
- print("action: \(action.actionName), code: \(action.actionCode)")
actions.append(action)
@@ -107,7 +106,7 @@
// print("Scan location is \(scanner.scanLocation)")
guard let line = line else {
- print("Line is somehow null, quitting")
+ print("Xcode To Whisk: Error, line from tokenizer is nil, aborting.")
return nil
}
@@ -147,8 +146,6 @@
case .parseAction:
- print("ParseAction: \(trimmedLine)")
-
var lookingForLeftBracket = false
if leftBracketCount == 0 {
lookingForLeftBracket = true