diff --git a/BuildaKit/Logging.swift b/BuildaKit/Logging.swift index 4ec0801..c179aff 100644 --- a/BuildaKit/Logging.swift +++ b/BuildaKit/Logging.swift @@ -13,7 +13,9 @@ public class Logging { public class func setup(persistence: Persistence, alsoIntoFile: Bool) { - let path = persistence.fileURLWithName("Builda.log", intention: .Writing, isDirectory: false) + let path = persistence + .fileURLWithName("Logs", intention: .Writing, isDirectory: true) + .URLByAppendingPathComponent("Builda.log", isDirectory: false) var loggers = [Logger]() diff --git a/BuildaKit/NetworkUtils.swift b/BuildaKit/NetworkUtils.swift index 35d0afd..51faf70 100644 --- a/BuildaKit/NetworkUtils.swift +++ b/BuildaKit/NetworkUtils.swift @@ -15,7 +15,7 @@ public class NetworkUtils { public class func checkAvailabilityOfGitHubWithCurrentSettingsOfProject(project: Project, completion: (success: Bool, error: ErrorType?) -> ()) { - let token = project.config.value.githubToken + let token = project.config.value.serverAuthentication! //TODO: have project spit out Set let options: Set = [.Token(token)] diff --git a/BuildaKit/Persistence.swift b/BuildaKit/Persistence.swift index 50dfbf6..87222d6 100644 --- a/BuildaKit/Persistence.swift +++ b/BuildaKit/Persistence.swift @@ -228,6 +228,16 @@ public class Persistence { _ = try? self.fileManager.copyItemAtURL(url, toURL: writeUrl) } + public func copyFileToFolder(fileName: String, folder: String) { + + let url = self.fileURLWithName(fileName, intention: .Reading, isDirectory: false) + let writeUrl = self + .fileURLWithName(folder, intention: .Writing, isDirectory: true) + .URLByAppendingPathComponent(fileName, isDirectory: false) + + _ = try? self.fileManager.copyItemAtURL(url, toURL: writeUrl) + } + public func createFolderIfNotExists(url: NSURL) { let fm = self.fileManager @@ -244,7 +254,7 @@ public class Persistence { case WritingNoCreateFolder } - private func folderForIntention(intention: PersistenceIntention) -> NSURL { + func folderForIntention(intention: PersistenceIntention) -> NSURL { switch intention { case .Reading: return self.readingFolder diff --git a/BuildaKit/PersistenceMigrator.swift b/BuildaKit/PersistenceMigrator.swift index 7d8906e..597a7cf 100644 --- a/BuildaKit/PersistenceMigrator.swift +++ b/BuildaKit/PersistenceMigrator.swift @@ -8,6 +8,7 @@ import Foundation import BuildaUtils +import XcodeServerSDK public protocol MigratorType { init(persistence: Persistence) @@ -47,7 +48,8 @@ public class CompositeMigrator: MigratorType { public required init(persistence: Persistence) { self.childMigrators = [ Migrator_v0_v1(persistence: persistence), - Migrator_v1_v2(persistence: persistence) + Migrator_v1_v2(persistence: persistence), + Migrator_v2_v3(persistence: persistence) ] } @@ -56,7 +58,9 @@ public class CompositeMigrator: MigratorType { } public func attemptMigration() throws { - try self.childMigrators.forEach { try $0.attemptMigration() } + try self.childMigrators + .filter { $0.isMigrationRequired() } + .forEach { try $0.attemptMigration() } } } @@ -107,8 +111,6 @@ class Migrator_v0_v1: MigratorType { /* - ServerConfigs.json: each server now has an id - - - Config.json: persistence_version: 1 -> 2 */ class Migrator_v1_v2: MigratorType { @@ -271,3 +273,111 @@ class Migrator_v1_v2: MigratorType { self.persistence.saveDictionary("Config.json", item: mutableConfig) } } + +/* +- ServerConfigs.json: password moved to the keychain +- Projects.json: github_token -> server_authentication, ssh_passphrase moved to keychain +- move any .log files to a separate folder called 'Logs' +*/ +class Migrator_v2_v3: MigratorType { + + internal var persistence: Persistence + required init(persistence: Persistence) { + self.persistence = persistence + } + + func isMigrationRequired() -> Bool { + + return self.persistenceVersion() == 2 + } + + func attemptMigration() throws { + + let pers = self.persistence + + //migrate + self.migrateProjectAuthentication() + self.migrateServerAuthentication() + self.migrateLogs() + + //copy the rest + pers.copyFileToWriteLocation("Syncers.json", isDirectory: false) + pers.copyFileToWriteLocation("BuildTemplates", isDirectory: true) + pers.copyFileToWriteLocation("Triggers", isDirectory: true) + + let config = self.config() + let mutableConfig = config.mutableCopy() as! NSMutableDictionary + mutableConfig[kPersistenceVersion] = 3 + + //save the updated config + pers.saveDictionary("Config.json", item: mutableConfig) + } + + func migrateProjectAuthentication() { + + let pers = self.persistence + let projects = pers.loadArrayOfDictionariesFromFile("Projects.json") ?? [] + let mutableProjects = projects.map { $0.mutableCopy() as! NSMutableDictionary } + + let renamedAuth = mutableProjects.map { + (d: NSMutableDictionary) -> NSDictionary in + + let id = d.stringForKey("id") + let token = d.stringForKey("github_token") + let passphrase = d.optionalStringForKey("ssh_passphrase") + d.removeObjectForKey("github_token") + d.removeObjectForKey("ssh_passphrase") + + let tokenKeychain = SecurePersistence.sourceServerTokenKeychain() + tokenKeychain.writeIfNeeded(id, value: token) + + let passphraseKeychain = SecurePersistence.sourceServerPassphraseKeychain() + passphraseKeychain.writeIfNeeded(id, value: passphrase) + + precondition(tokenKeychain.read(id) == token, "Saved token must match") + precondition(passphraseKeychain.read(id) == passphrase, "Saved passphrase must match") + + return d + } + + pers.saveArray("Projects.json", items: renamedAuth) + } + + func migrateServerAuthentication() { + + let pers = self.persistence + let servers = pers.loadArrayOfDictionariesFromFile("ServerConfigs.json") ?? [] + let mutableServers = servers.map { $0.mutableCopy() as! NSMutableDictionary } + + let withoutPasswords = mutableServers.map { + (d: NSMutableDictionary) -> NSDictionary in + + let password = d.stringForKey("password") + let key = (try! XcodeServerConfig(json: d)).keychainKey() + + let keychain = SecurePersistence.xcodeServerPasswordKeychain() + keychain.writeIfNeeded(key, value: password) + + d.removeObjectForKey("password") + + precondition(keychain.read(key) == password, "Saved password must match") + + return d + } + + pers.saveArray("ServerConfigs.json", items: withoutPasswords) + } + + func migrateLogs() { + + let pers = self.persistence + (pers.filesInFolder(pers.folderForIntention(.Reading)) ?? []) + .map { $0.lastPathComponent ?? "" } + .filter { $0.hasSuffix("log") } + .forEach { + pers.copyFileToFolder($0, folder: "Logs") + pers.deleteFile($0) + } + } +} + diff --git a/BuildaKit/ProjectConfig.swift b/BuildaKit/ProjectConfig.swift index 7727928..15eee32 100644 --- a/BuildaKit/ProjectConfig.swift +++ b/BuildaKit/ProjectConfig.swift @@ -13,16 +13,17 @@ public struct ProjectConfig { public let id: RefType public var url: String - public var githubToken: String public var privateSSHKeyPath: String public var publicSSHKeyPath: String - public var sshPassphrase: String? + + public var sshPassphrase: String? //loaded from the keychain + public var serverAuthentication: String? //loaded from the keychain //creates a new default ProjectConfig public init() { self.id = Ref.new() self.url = "" - self.githubToken = "" + self.serverAuthentication = "" self.privateSSHKeyPath = "" self.publicSSHKeyPath = "" self.sshPassphrase = nil @@ -36,10 +37,8 @@ public struct ProjectConfig { private struct Keys { static let URL = "url" - static let GitHubToken = "github_token" static let PrivateSSHKeyPath = "ssh_private_key_url" static let PublicSSHKeyPath = "ssh_public_key_url" - static let SSHPassphrase = "ssh_passphrase" static let Id = "id" } @@ -50,22 +49,18 @@ extension ProjectConfig: JSONSerializable { let json = NSMutableDictionary() json[Keys.URL] = self.url - json[Keys.GitHubToken] = self.githubToken json[Keys.PrivateSSHKeyPath] = self.privateSSHKeyPath json[Keys.PublicSSHKeyPath] = self.publicSSHKeyPath json[Keys.Id] = self.id - json.optionallyAddValueForKey(self.sshPassphrase, key: "ssh_passphrase") return json } public init(json: NSDictionary) throws { self.url = try json.get(Keys.URL) - self.githubToken = try json.get(Keys.GitHubToken) self.privateSSHKeyPath = try json.get(Keys.PrivateSSHKeyPath) self.publicSSHKeyPath = try json.get(Keys.PublicSSHKeyPath) self.id = try json.get(Keys.Id) - self.sshPassphrase = try json.getOptionally(Keys.SSHPassphrase) } } diff --git a/BuildaKit/SecurePersistence.swift b/BuildaKit/SecurePersistence.swift new file mode 100644 index 0000000..aad9c72 --- /dev/null +++ b/BuildaKit/SecurePersistence.swift @@ -0,0 +1,96 @@ +// +// SecurePersistence.swift +// Buildasaur +// +// Created by Honza Dvorsky on 1/22/16. +// Copyright © 2016 Honza Dvorsky. All rights reserved. +// + +import Foundation +import KeychainAccess +import XcodeServerSDK +import SwiftSafe + +final class SecurePersistence { + + #if TESTING + typealias Keychain = NSMutableDictionary + #endif + + static let Prefix = "com.honzadvorsky.buildasaur" + + private let keychain: Keychain + private let safe: Safe + + private init(keychain: Keychain, safe: Safe = EREW()) { + self.keychain = keychain + self.safe = safe + } + + static func xcodeServerPasswordKeychain() -> SecurePersistence { + return self.keychain("\(Prefix).xcs.password") + } + + static func sourceServerTokenKeychain() -> SecurePersistence { + return self.keychain("\(Prefix).source_server.oauth_tokens") + } + + static func sourceServerPassphraseKeychain() -> SecurePersistence { + return self.keychain("\(Prefix).source_server.passphrase") + } + + static private func keychain(service: String) -> SecurePersistence { + #if TESTING + let keychain = NSMutableDictionary() + #else + let keychain = Keychain(service: service) + #endif + return self.init(keychain: keychain) + } + + func read(key: String) -> String? { + var val: String? + self.safe.read { + #if TESTING + val = self.keychain[key] as? String + #else + val = self.keychain[key] + #endif + } + return val + } + + func writeIfNeeded(key: String, value: String?) { + self.safe.write { + self.updateIfNeeded(key, value: value) + } + } + + private func updateIfNeeded(key: String, value: String?) { + #if TESTING + let existing = self.keychain[key] as? String + #else + let existing = self.keychain[key] + #endif + if existing != value { + self.keychain[key] = value + } + } +} + +public protocol KeychainSaveable { + func keychainKey() -> String +} + +extension XcodeServerConfig: KeychainSaveable { + public func keychainKey() -> String { + return "\(self.host):\(self.user ?? "")" + } +} + +extension ProjectConfig: KeychainSaveable { + public func keychainKey() -> String { + return self.id + } +} + diff --git a/BuildaKit/StorageManager.swift b/BuildaKit/StorageManager.swift index 0c1a6c6..8e8dc28 100644 --- a/BuildaKit/StorageManager.swift +++ b/BuildaKit/StorageManager.swift @@ -166,10 +166,29 @@ public class StorageManager { private func loadAllFromPersistence() { self.config.value = self.persistence.loadDictionaryFromFile("Config.json") ?? [:] + let allProjects: [ProjectConfig] = self.persistence.loadArrayFromFile("Projects.json") ?? [] - self.projectConfigs.value = allProjects.dictionarifyWithKey { $0.id } + //load server token & ssh passphrase from keychain + let tokenKeychain = SecurePersistence.sourceServerTokenKeychain() + let passphraseKeychain = SecurePersistence.sourceServerPassphraseKeychain() + self.projectConfigs.value = allProjects + .map { + (var p: ProjectConfig) -> ProjectConfig in + p.serverAuthentication = tokenKeychain.read(p.keychainKey()) + p.sshPassphrase = passphraseKeychain.read(p.keychainKey()) + return p + }.dictionarifyWithKey { $0.id } + let allServerConfigs: [XcodeServerConfig] = self.persistence.loadArrayFromFile("ServerConfigs.json") ?? [] - self.serverConfigs.value = allServerConfigs.dictionarifyWithKey { $0.id } + //load xcs passwords from keychain + let xcsConfigKeychain = SecurePersistence.xcodeServerPasswordKeychain() + self.serverConfigs.value = allServerConfigs + .map { + (var x: XcodeServerConfig) -> XcodeServerConfig in + x.password = xcsConfigKeychain.read(x.keychainKey()) + return x + }.dictionarifyWithKey { $0.id } + let allTemplates: [BuildTemplate] = self.persistence.loadArrayFromFolder("BuildTemplates") ?? [] self.buildTemplates.value = allTemplates.dictionarifyWithKey { $0.id } let allTriggers: [TriggerConfig] = self.persistence.loadArrayFromFolder("Triggers") ?? [] @@ -210,11 +229,21 @@ public class StorageManager { private func saveProjectConfigs(configs: [String: ProjectConfig]) { let projectConfigs: NSArray = Array(configs.values).map { $0.jsonify() } + let tokenKeychain = SecurePersistence.sourceServerTokenKeychain() + let passphraseKeychain = SecurePersistence.sourceServerPassphraseKeychain() + configs.values.forEach { + tokenKeychain.writeIfNeeded($0.keychainKey(), value: $0.serverAuthentication) + passphraseKeychain.writeIfNeeded($0.keychainKey(), value: $0.sshPassphrase) + } self.persistence.saveArray("Projects.json", items: projectConfigs) } private func saveServerConfigs(configs: [String: XcodeServerConfig]) { let serverConfigs = Array(configs.values).map { $0.jsonify() } + let serverConfigKeychain = SecurePersistence.xcodeServerPasswordKeychain() + configs.values.forEach { + serverConfigKeychain.writeIfNeeded($0.keychainKey(), value: $0.password) + } self.persistence.saveArray("ServerConfigs.json", items: serverConfigs) } diff --git a/BuildaKit/SyncerFactory.swift b/BuildaKit/SyncerFactory.swift index 22454b4..7b1e862 100644 --- a/BuildaKit/SyncerFactory.swift +++ b/BuildaKit/SyncerFactory.swift @@ -31,7 +31,8 @@ public class SyncerFactory: SyncerFactoryType { private func createSyncer(triplet: ConfigTriplet) -> HDGitHubXCBotSyncer? { let xcodeServer = self.createXcodeServer(triplet.server) - let sourceServer = self.createSourceServer(triplet.project.githubToken) //TODO: pull out as SourceServerOptions + //TODO: pull out authentication as SourceServerOptions + let sourceServer = self.createSourceServer(triplet.project.serverAuthentication ?? "") let maybeProject = self.createProject(triplet.project) let triggers = triplet.triggers.map { self.createTrigger($0) } diff --git a/BuildaKitTests/Migration/Buildasaur-format-2-example2/BuildTemplates/9B53CC35-57DA-4DA0-9B85-05FCF109512A.json b/BuildaKitTests/Migration/Buildasaur-format-2-example2/BuildTemplates/9B53CC35-57DA-4DA0-9B85-05FCF109512A.json new file mode 100644 index 0000000..c0064b6 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-2-example2/BuildTemplates/9B53CC35-57DA-4DA0-9B85-05FCF109512A.json @@ -0,0 +1,26 @@ +{ + "id" : "9B53CC35-57DA-4DA0-9B85-05FCF109512A", + "project_name" : "Buildasaur", + "schedule" : { + "weeklyScheduleDay" : 0, + "periodicScheduleInterval" : 0, + "hourOfIntegration" : 0, + "minutesAfterHourToIntegrate" : 0, + "scheduleType" : 3 + }, + "triggers" : [ + "E8F5285A-A262-4630-AF7B-236772B75760", + "4E66D0D5-D5CC-417E-A40E-73B513CE4E10" + ], + "should_analyze" : true, + "platform_type" : "com.apple.platform.macosx", + "scheme" : "Buildasaur", + "device_filter" : 0, + "cleaning_policy" : 0, + "testing_devices" : [ + + ], + "should_archive" : false, + "name" : "Buildasaur PR", + "should_test" : true +} \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-2-example2/BuildTemplates/B31C6530-BB84-4A93-B08C-54074AAB5F37.json b/BuildaKitTests/Migration/Buildasaur-format-2-example2/BuildTemplates/B31C6530-BB84-4A93-B08C-54074AAB5F37.json new file mode 100644 index 0000000..8d6a805 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-2-example2/BuildTemplates/B31C6530-BB84-4A93-B08C-54074AAB5F37.json @@ -0,0 +1,26 @@ +{ + "id" : "B31C6530-BB84-4A93-B08C-54074AAB5F37", + "project_name" : "Buildasaur-Tester", + "schedule" : { + "weeklyScheduleDay" : 0, + "periodicScheduleInterval" : 0, + "hourOfIntegration" : 0, + "minutesAfterHourToIntegrate" : 0, + "scheduleType" : 3 + }, + "triggers" : [ + "E8F5285A-A262-4630-AF7B-236772B75760", + "4E66D0D5-D5CC-417E-A40E-73B513CE4E10" + ], + "should_analyze" : true, + "platform_type" : "com.apple.platform.iphoneos", + "scheme" : "Buildasaur-Tester", + "device_filter" : 0, + "cleaning_policy" : 0, + "testing_devices" : [ + + ], + "should_archive" : false, + "name" : "BuildaTest PR", + "should_test" : true +} \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-2-example2/Builda.log b/BuildaKitTests/Migration/Buildasaur-format-2-example2/Builda.log new file mode 100644 index 0000000..253ec35 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-2-example2/Builda.log @@ -0,0 +1,89 @@ +* +* +* + ____ _ _ _ +| _ \ (_) | | | +| |_) |_ _ _| | __| | __ _ ___ __ _ _ _ _ __ +| _ <| | | | | |/ _` |/ _` / __|/ _` | | | | '__| +| |_) | |_| | | | (_| | (_| \__ \ (_| | |_| | | +|____/ \__,_|_|_|\__,_|\__,_|___/\__,_|\__,_|_| + +Buildasaur 0.5.1 launched at 2015-10-12 13:57:46 +0000. +* +* +* + +[INFO]: Will send anonymous heartbeat. To opt out add `"heartbeat_opt_out" = true` to ~/Library/Application Support/Buildasaur/Config.json +[INFO]: Sending heartbeat event ["event_type": launch] +[INFO]: Sending heartbeat event ["event_type": heartbeat, "uptime": 0.03319501876831055, "running_syncers": 0] +[INFO]: Project: file:///Users/honzadvorsky/Documents/Buildasaur-Tester/Buildasaur-Tester.xcodeproj +[VERBOSE]: Finished fetching devices +[INFO]: Key: Optional(file:///Users/honzadvorsky/.ssh/id_rsa.pub) +[INFO]: Key: Optional(file:///Users/honzadvorsky/.ssh/id_rsa) + +------------------------------------ + +[INFO]: Sync starting at 2015-10-12 14:00:27 +0000 +[VERBOSE]: Resolving prs: + PR 9: test change [czechboy0-patch-6 -> master] + PR 8: Update README.md PR2 [czechboy0-patch-3 -> czechboy0-patch-2] + PR 6: Update ViewController.swift [czechboy0-patch-4 -> master] + PR 4: Update README.md [czechboy0-patch-2 -> master] +and branches: + +and bots: + Bot Buildasaur Bot + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #6 + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #9 + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #4 + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #8 + Bot BuildaBot [czechboy0/XcodeServerSDK] PR #117 + Bot BuildaBot [czechboy0/XcodeServerSDK] PR #106 + Bot BuildaBot [czechboy0/Buildasaur] PR #138 + Bot BuildaBot [czechboy0/XcodeServerSDK] |-> master + Bot BuildaBot [czechboy0/Buildasaur] |-> master + Bot Buildasaur-TestProject-iOS Bot +[VERBOSE]: SyncPair PR (9:czechboy0-patch-6) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #9) finished sync after 0.388 seconds. +[VERBOSE]: SyncPair PR (6:czechboy0-patch-4) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #6) finished sync after 0.702 seconds. +[VERBOSE]: SyncPair PR (4:czechboy0-patch-2) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #4) finished sync after 0.718 seconds. +[VERBOSE]: SyncPair PR (8:czechboy0-patch-3) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #8) finished sync after 1.156 seconds. +[INFO]: GitHub Rate Limit: count: 0/5000, renews in 3598 seconds, rate: 0.0/1.38, using 0.0% of the allowed request rate. +[INFO]: Sync finished successfully at 2015-10-12 14:00:29 +0000, took 1.59 seconds. + +------------------------------------ + +[INFO]: Sync starting at 2015-10-12 14:00:34 +0000 +[VERBOSE]: Resolving prs: + PR 9: test change [czechboy0-patch-6 -> master] + PR 8: Update README.md PR2 [czechboy0-patch-3 -> czechboy0-patch-2] + PR 6: Update ViewController.swift [czechboy0-patch-4 -> master] + PR 4: Update README.md [czechboy0-patch-2 -> master] +and branches: + Branch [almost-master:5b1d734f0170583b54fa749ff9bc47670abd66ad] + Branch [czechboy0-patch-1:ddb1e4840e35a611c2627168d8330ddf80c569d9] + Branch [czechboy0-patch-2:26cf7e9a027579f057aceaa9b09625317d31efde] + Branch [czechboy0-patch-3:ef2d5e2e0755bdff3945134e9a160d86a0698fe2] + Branch [czechboy0-patch-4:603e18851f66ee66a1223ea65e5f1e18e4353664] + Branch [czechboy0-patch-5:c1da8cd5cc61c62f8700766314ba26c7f03ea9ab] + Branch [czechboy0-patch-6:2ab73752fe7ed2d8f67187d7ba0552126a158de1] + Branch [master:510352edd9cdabd45f608e4327a8dd48ac517230] +and bots: + Bot Buildasaur Bot + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #6 + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #9 + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #4 + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #8 + Bot BuildaBot [czechboy0/XcodeServerSDK] PR #117 + Bot BuildaBot [czechboy0/XcodeServerSDK] PR #106 + Bot BuildaBot [czechboy0/Buildasaur] PR #138 + Bot BuildaBot [czechboy0/XcodeServerSDK] |-> master + Bot BuildaBot [czechboy0/Buildasaur] |-> master + Bot Buildasaur-TestProject-iOS Bot +[VERBOSE]: SyncPair PR (4:czechboy0-patch-2) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #4) finished sync after 0.068 seconds. +[VERBOSE]: SyncPair PR (6:czechboy0-patch-4) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #6) finished sync after 0.165 seconds. +[VERBOSE]: SyncPair PR (8:czechboy0-patch-3) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #8) finished sync after 0.186 seconds. +[VERBOSE]: SyncPair PR (9:czechboy0-patch-6) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #9) finished sync after 0.191 seconds. +[INFO]: Successfully created bot BuildaBot [czechboy0/Buildasaur-Tester] |-> master +[VERBOSE]: SyncPair Branch (master) + No Bot finished sync after 3.97 seconds. +[INFO]: GitHub Rate Limit: count: 0/5000, renews in 3593 seconds, rate: 0.0/1.38, using 0.0% of the allowed request rate. +[INFO]: Sync finished successfully at 2015-10-12 14:00:38 +0000, took 4.027 seconds. diff --git a/BuildaKitTests/Migration/Buildasaur-format-2-example2/Config.json b/BuildaKitTests/Migration/Buildasaur-format-2-example2/Config.json new file mode 100644 index 0000000..2a71818 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-2-example2/Config.json @@ -0,0 +1,3 @@ +{ + "persistence_version" : 2 +} \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-2-example2/Projects.json b/BuildaKitTests/Migration/Buildasaur-format-2-example2/Projects.json new file mode 100644 index 0000000..ad48e69 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-2-example2/Projects.json @@ -0,0 +1,18 @@ +[ + { + "ssh_public_key_url" : "\/Users\/honzadvorsky\/.ssh\/id_rsa.pub", + "id" : "4E8E7708-01FB-448A-B929-A54887CC5857", + "url" : "\/Users\/honzadvorsky\/Documents\/Buildasaur-Tester\/Buildasaur-Tester.xcodeproj", + "github_token" : "example_token-123456786543456765432", + "ssh_private_key_url" : "\/Users\/honzadvorsky\/.ssh\/id_rsa", + "ssh_passphrase": "my_passphrase_much_secret" + }, + { + "ssh_public_key_url" : "\/Users\/honzadvorsky\/.ssh\/id_rsa.pub", + "id" : "D316F062-7FEC-497A-B20E-6776AA413009", + "url" : "\/Users\/honzadvorsky\/Documents\/Buildasaur\/Buildasaur.xcodeproj", + "github_token" : "example_token-44446786543456765432", + "ssh_private_key_url" : "\/Users\/honzadvorsky\/.ssh\/id_rsa", + "ssh_passphrase": "my_passphrase_much_secret_2" + } +] \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-2-example2/ServerConfigs.json b/BuildaKitTests/Migration/Buildasaur-format-2-example2/ServerConfigs.json new file mode 100644 index 0000000..f222a99 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-2-example2/ServerConfigs.json @@ -0,0 +1,14 @@ +[ + { + "password" : "SuperSecretPa55word", + "id" : "D143B09C-CB1B-4831-8BA1-E2F8AB039B56", + "host" : "https:\/\/127.0.0.1", + "user" : "testadmin1" + }, + { + "password" : "SuperSecretPa55word77878787", + "id" : "76826238-64AE-4F48-B4B8-52A6B7A65EE4", + "host" : "https:\/\/localhost", + "user" : "testadmin8" + } +] \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-2-example2/Syncers.json b/BuildaKitTests/Migration/Buildasaur-format-2-example2/Syncers.json new file mode 100644 index 0000000..c75f4f4 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-2-example2/Syncers.json @@ -0,0 +1,26 @@ +[ + { + "preferred_template_ref" : "B31C6530-BB84-4A93-B08C-54074AAB5F37", + "id" : "564C267D-FF06-4008-9EF6-66B3AC1A3BDE", + "sync_interval" : 19, + "server_ref" : "D143B09C-CB1B-4831-8BA1-E2F8AB039B56", + "wait_for_lttm" : false, + "watched_branches" : [ + "master" + ], + "project_ref" : "4E8E7708-01FB-448A-B929-A54887CC5857", + "post_status_comments" : false + }, + { + "preferred_template_ref" : "9B53CC35-57DA-4DA0-9B85-05FCF109512A", + "id" : "B3A35C28-2176-4D88-8F60-5C769AEDBB2E", + "sync_interval" : 15, + "server_ref" : "76826238-64AE-4F48-B4B8-52A6B7A65EE4", + "wait_for_lttm" : false, + "watched_branches" : [ + "master" + ], + "project_ref" : "D316F062-7FEC-497A-B20E-6776AA413009", + "post_status_comments" : false + } +] \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-2-example2/Triggers/4E66D0D5-D5CC-417E-A40E-73B513CE4E10.json b/BuildaKitTests/Migration/Buildasaur-format-2-example2/Triggers/4E66D0D5-D5CC-417E-A40E-73B513CE4E10.json new file mode 100644 index 0000000..b480ff1 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-2-example2/Triggers/4E66D0D5-D5CC-417E-A40E-73B513CE4E10.json @@ -0,0 +1,25 @@ +{ + "phase" : 2, + "id" : "4E66D0D5-D5CC-417E-A40E-73B513CE4E10", + "scriptBody" : "", + "conditions" : { + "status" : 2, + "onWarnings" : true, + "onBuildErrors" : true, + "onInternalErrors" : true, + "onAnalyzerWarnings" : true, + "onFailingTests" : true, + "onSuccess" : true + }, + "type" : 2, + "name" : "Postbuild Email", + "emailConfiguration" : { + "includeCommitMessages" : true, + "additionalRecipients" : [ + "h@d.com", + "yo@ma.lo" + ], + "emailCommitters" : false, + "includeIssueDetails" : true + } +} \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-2-example2/Triggers/E8F5285A-A262-4630-AF7B-236772B75760.json b/BuildaKitTests/Migration/Buildasaur-format-2-example2/Triggers/E8F5285A-A262-4630-AF7B-236772B75760.json new file mode 100644 index 0000000..5c263b7 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-2-example2/Triggers/E8F5285A-A262-4630-AF7B-236772B75760.json @@ -0,0 +1,7 @@ +{ + "phase" : 1, + "scriptBody" : "echo \"hello\"\n", + "id" : "E8F5285A-A262-4630-AF7B-236772B75760", + "type" : 1, + "name" : "Prebuild Script" +} \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-3-example1/BuildTemplates/9B53CC35-57DA-4DA0-9B85-05FCF109512A.json b/BuildaKitTests/Migration/Buildasaur-format-3-example1/BuildTemplates/9B53CC35-57DA-4DA0-9B85-05FCF109512A.json new file mode 100644 index 0000000..c0064b6 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-3-example1/BuildTemplates/9B53CC35-57DA-4DA0-9B85-05FCF109512A.json @@ -0,0 +1,26 @@ +{ + "id" : "9B53CC35-57DA-4DA0-9B85-05FCF109512A", + "project_name" : "Buildasaur", + "schedule" : { + "weeklyScheduleDay" : 0, + "periodicScheduleInterval" : 0, + "hourOfIntegration" : 0, + "minutesAfterHourToIntegrate" : 0, + "scheduleType" : 3 + }, + "triggers" : [ + "E8F5285A-A262-4630-AF7B-236772B75760", + "4E66D0D5-D5CC-417E-A40E-73B513CE4E10" + ], + "should_analyze" : true, + "platform_type" : "com.apple.platform.macosx", + "scheme" : "Buildasaur", + "device_filter" : 0, + "cleaning_policy" : 0, + "testing_devices" : [ + + ], + "should_archive" : false, + "name" : "Buildasaur PR", + "should_test" : true +} \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-3-example1/BuildTemplates/B31C6530-BB84-4A93-B08C-54074AAB5F37.json b/BuildaKitTests/Migration/Buildasaur-format-3-example1/BuildTemplates/B31C6530-BB84-4A93-B08C-54074AAB5F37.json new file mode 100644 index 0000000..8d6a805 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-3-example1/BuildTemplates/B31C6530-BB84-4A93-B08C-54074AAB5F37.json @@ -0,0 +1,26 @@ +{ + "id" : "B31C6530-BB84-4A93-B08C-54074AAB5F37", + "project_name" : "Buildasaur-Tester", + "schedule" : { + "weeklyScheduleDay" : 0, + "periodicScheduleInterval" : 0, + "hourOfIntegration" : 0, + "minutesAfterHourToIntegrate" : 0, + "scheduleType" : 3 + }, + "triggers" : [ + "E8F5285A-A262-4630-AF7B-236772B75760", + "4E66D0D5-D5CC-417E-A40E-73B513CE4E10" + ], + "should_analyze" : true, + "platform_type" : "com.apple.platform.iphoneos", + "scheme" : "Buildasaur-Tester", + "device_filter" : 0, + "cleaning_policy" : 0, + "testing_devices" : [ + + ], + "should_archive" : false, + "name" : "BuildaTest PR", + "should_test" : true +} \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-3-example1/Config.json b/BuildaKitTests/Migration/Buildasaur-format-3-example1/Config.json new file mode 100644 index 0000000..906c841 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-3-example1/Config.json @@ -0,0 +1,3 @@ +{ + "persistence_version" : 3 +} \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-3-example1/Logs/Builda.log b/BuildaKitTests/Migration/Buildasaur-format-3-example1/Logs/Builda.log new file mode 100644 index 0000000..253ec35 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-3-example1/Logs/Builda.log @@ -0,0 +1,89 @@ +* +* +* + ____ _ _ _ +| _ \ (_) | | | +| |_) |_ _ _| | __| | __ _ ___ __ _ _ _ _ __ +| _ <| | | | | |/ _` |/ _` / __|/ _` | | | | '__| +| |_) | |_| | | | (_| | (_| \__ \ (_| | |_| | | +|____/ \__,_|_|_|\__,_|\__,_|___/\__,_|\__,_|_| + +Buildasaur 0.5.1 launched at 2015-10-12 13:57:46 +0000. +* +* +* + +[INFO]: Will send anonymous heartbeat. To opt out add `"heartbeat_opt_out" = true` to ~/Library/Application Support/Buildasaur/Config.json +[INFO]: Sending heartbeat event ["event_type": launch] +[INFO]: Sending heartbeat event ["event_type": heartbeat, "uptime": 0.03319501876831055, "running_syncers": 0] +[INFO]: Project: file:///Users/honzadvorsky/Documents/Buildasaur-Tester/Buildasaur-Tester.xcodeproj +[VERBOSE]: Finished fetching devices +[INFO]: Key: Optional(file:///Users/honzadvorsky/.ssh/id_rsa.pub) +[INFO]: Key: Optional(file:///Users/honzadvorsky/.ssh/id_rsa) + +------------------------------------ + +[INFO]: Sync starting at 2015-10-12 14:00:27 +0000 +[VERBOSE]: Resolving prs: + PR 9: test change [czechboy0-patch-6 -> master] + PR 8: Update README.md PR2 [czechboy0-patch-3 -> czechboy0-patch-2] + PR 6: Update ViewController.swift [czechboy0-patch-4 -> master] + PR 4: Update README.md [czechboy0-patch-2 -> master] +and branches: + +and bots: + Bot Buildasaur Bot + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #6 + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #9 + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #4 + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #8 + Bot BuildaBot [czechboy0/XcodeServerSDK] PR #117 + Bot BuildaBot [czechboy0/XcodeServerSDK] PR #106 + Bot BuildaBot [czechboy0/Buildasaur] PR #138 + Bot BuildaBot [czechboy0/XcodeServerSDK] |-> master + Bot BuildaBot [czechboy0/Buildasaur] |-> master + Bot Buildasaur-TestProject-iOS Bot +[VERBOSE]: SyncPair PR (9:czechboy0-patch-6) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #9) finished sync after 0.388 seconds. +[VERBOSE]: SyncPair PR (6:czechboy0-patch-4) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #6) finished sync after 0.702 seconds. +[VERBOSE]: SyncPair PR (4:czechboy0-patch-2) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #4) finished sync after 0.718 seconds. +[VERBOSE]: SyncPair PR (8:czechboy0-patch-3) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #8) finished sync after 1.156 seconds. +[INFO]: GitHub Rate Limit: count: 0/5000, renews in 3598 seconds, rate: 0.0/1.38, using 0.0% of the allowed request rate. +[INFO]: Sync finished successfully at 2015-10-12 14:00:29 +0000, took 1.59 seconds. + +------------------------------------ + +[INFO]: Sync starting at 2015-10-12 14:00:34 +0000 +[VERBOSE]: Resolving prs: + PR 9: test change [czechboy0-patch-6 -> master] + PR 8: Update README.md PR2 [czechboy0-patch-3 -> czechboy0-patch-2] + PR 6: Update ViewController.swift [czechboy0-patch-4 -> master] + PR 4: Update README.md [czechboy0-patch-2 -> master] +and branches: + Branch [almost-master:5b1d734f0170583b54fa749ff9bc47670abd66ad] + Branch [czechboy0-patch-1:ddb1e4840e35a611c2627168d8330ddf80c569d9] + Branch [czechboy0-patch-2:26cf7e9a027579f057aceaa9b09625317d31efde] + Branch [czechboy0-patch-3:ef2d5e2e0755bdff3945134e9a160d86a0698fe2] + Branch [czechboy0-patch-4:603e18851f66ee66a1223ea65e5f1e18e4353664] + Branch [czechboy0-patch-5:c1da8cd5cc61c62f8700766314ba26c7f03ea9ab] + Branch [czechboy0-patch-6:2ab73752fe7ed2d8f67187d7ba0552126a158de1] + Branch [master:510352edd9cdabd45f608e4327a8dd48ac517230] +and bots: + Bot Buildasaur Bot + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #6 + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #9 + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #4 + Bot BuildaBot [czechboy0/Buildasaur-Tester] PR #8 + Bot BuildaBot [czechboy0/XcodeServerSDK] PR #117 + Bot BuildaBot [czechboy0/XcodeServerSDK] PR #106 + Bot BuildaBot [czechboy0/Buildasaur] PR #138 + Bot BuildaBot [czechboy0/XcodeServerSDK] |-> master + Bot BuildaBot [czechboy0/Buildasaur] |-> master + Bot Buildasaur-TestProject-iOS Bot +[VERBOSE]: SyncPair PR (4:czechboy0-patch-2) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #4) finished sync after 0.068 seconds. +[VERBOSE]: SyncPair PR (6:czechboy0-patch-4) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #6) finished sync after 0.165 seconds. +[VERBOSE]: SyncPair PR (8:czechboy0-patch-3) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #8) finished sync after 0.186 seconds. +[VERBOSE]: SyncPair PR (9:czechboy0-patch-6) + Bot (BuildaBot [czechboy0/Buildasaur-Tester] PR #9) finished sync after 0.191 seconds. +[INFO]: Successfully created bot BuildaBot [czechboy0/Buildasaur-Tester] |-> master +[VERBOSE]: SyncPair Branch (master) + No Bot finished sync after 3.97 seconds. +[INFO]: GitHub Rate Limit: count: 0/5000, renews in 3593 seconds, rate: 0.0/1.38, using 0.0% of the allowed request rate. +[INFO]: Sync finished successfully at 2015-10-12 14:00:38 +0000, took 4.027 seconds. diff --git a/BuildaKitTests/Migration/Buildasaur-format-3-example1/Projects.json b/BuildaKitTests/Migration/Buildasaur-format-3-example1/Projects.json new file mode 100644 index 0000000..a82d7e1 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-3-example1/Projects.json @@ -0,0 +1,14 @@ +[ + { + "ssh_public_key_url" : "\/Users\/honzadvorsky\/.ssh\/id_rsa.pub", + "id" : "4E8E7708-01FB-448A-B929-A54887CC5857", + "url" : "\/Users\/honzadvorsky\/Documents\/Buildasaur-Tester\/Buildasaur-Tester.xcodeproj", + "ssh_private_key_url" : "\/Users\/honzadvorsky\/.ssh\/id_rsa" + }, + { + "ssh_public_key_url" : "\/Users\/honzadvorsky\/.ssh\/id_rsa.pub", + "id" : "D316F062-7FEC-497A-B20E-6776AA413009", + "url" : "\/Users\/honzadvorsky\/Documents\/Buildasaur\/Buildasaur.xcodeproj", + "ssh_private_key_url" : "\/Users\/honzadvorsky\/.ssh\/id_rsa" + } +] \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-3-example1/ServerConfigs.json b/BuildaKitTests/Migration/Buildasaur-format-3-example1/ServerConfigs.json new file mode 100644 index 0000000..caa2de8 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-3-example1/ServerConfigs.json @@ -0,0 +1,12 @@ +[ + { + "id" : "D143B09C-CB1B-4831-8BA1-E2F8AB039B56", + "host" : "https:\/\/127.0.0.1", + "user" : "testadmin1" + }, + { + "id" : "76826238-64AE-4F48-B4B8-52A6B7A65EE4", + "host" : "https:\/\/localhost", + "user" : "testadmin8" + } +] \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-3-example1/Syncers.json b/BuildaKitTests/Migration/Buildasaur-format-3-example1/Syncers.json new file mode 100644 index 0000000..c75f4f4 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-3-example1/Syncers.json @@ -0,0 +1,26 @@ +[ + { + "preferred_template_ref" : "B31C6530-BB84-4A93-B08C-54074AAB5F37", + "id" : "564C267D-FF06-4008-9EF6-66B3AC1A3BDE", + "sync_interval" : 19, + "server_ref" : "D143B09C-CB1B-4831-8BA1-E2F8AB039B56", + "wait_for_lttm" : false, + "watched_branches" : [ + "master" + ], + "project_ref" : "4E8E7708-01FB-448A-B929-A54887CC5857", + "post_status_comments" : false + }, + { + "preferred_template_ref" : "9B53CC35-57DA-4DA0-9B85-05FCF109512A", + "id" : "B3A35C28-2176-4D88-8F60-5C769AEDBB2E", + "sync_interval" : 15, + "server_ref" : "76826238-64AE-4F48-B4B8-52A6B7A65EE4", + "wait_for_lttm" : false, + "watched_branches" : [ + "master" + ], + "project_ref" : "D316F062-7FEC-497A-B20E-6776AA413009", + "post_status_comments" : false + } +] \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-3-example1/Triggers/4E66D0D5-D5CC-417E-A40E-73B513CE4E10.json b/BuildaKitTests/Migration/Buildasaur-format-3-example1/Triggers/4E66D0D5-D5CC-417E-A40E-73B513CE4E10.json new file mode 100644 index 0000000..b480ff1 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-3-example1/Triggers/4E66D0D5-D5CC-417E-A40E-73B513CE4E10.json @@ -0,0 +1,25 @@ +{ + "phase" : 2, + "id" : "4E66D0D5-D5CC-417E-A40E-73B513CE4E10", + "scriptBody" : "", + "conditions" : { + "status" : 2, + "onWarnings" : true, + "onBuildErrors" : true, + "onInternalErrors" : true, + "onAnalyzerWarnings" : true, + "onFailingTests" : true, + "onSuccess" : true + }, + "type" : 2, + "name" : "Postbuild Email", + "emailConfiguration" : { + "includeCommitMessages" : true, + "additionalRecipients" : [ + "h@d.com", + "yo@ma.lo" + ], + "emailCommitters" : false, + "includeIssueDetails" : true + } +} \ No newline at end of file diff --git a/BuildaKitTests/Migration/Buildasaur-format-3-example1/Triggers/E8F5285A-A262-4630-AF7B-236772B75760.json b/BuildaKitTests/Migration/Buildasaur-format-3-example1/Triggers/E8F5285A-A262-4630-AF7B-236772B75760.json new file mode 100644 index 0000000..5c263b7 --- /dev/null +++ b/BuildaKitTests/Migration/Buildasaur-format-3-example1/Triggers/E8F5285A-A262-4630-AF7B-236772B75760.json @@ -0,0 +1,7 @@ +{ + "phase" : 1, + "scriptBody" : "echo \"hello\"\n", + "id" : "E8F5285A-A262-4630-AF7B-236772B75760", + "type" : 1, + "name" : "Prebuild Script" +} \ No newline at end of file diff --git a/BuildaKitTests/MigrationTests.swift b/BuildaKitTests/MigrationTests.swift index 8ffbd13..0b4c196 100644 --- a/BuildaKitTests/MigrationTests.swift +++ b/BuildaKitTests/MigrationTests.swift @@ -119,6 +119,25 @@ class MigrationTests: XCTestCase { } } + func testMigration_v2_v3() { + + let readingURL = self.resourceURLFromTestBundle("Buildasaur-format-2-example2") + let writingURL = self.writingURL("v2-v3") + let expectedURL = self.resourceURLFromTestBundle("Buildasaur-format-3-example1") + + let fileManager = NSFileManager.defaultManager() + + let persistence = Persistence(readingFolder: readingURL, writingFolder: writingURL, fileManager: fileManager) + let migrator = Migrator_v2_v3(persistence: persistence) + + do { + try migrator.attemptMigration() + try self.ensureEqualHierarchies(persistence, urlExpected: expectedURL, urlReal: writingURL) + } catch { + fail("\(error)") + } + } + func testPersistenceSetter() { let tmp = NSURL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true) diff --git a/Buildasaur.xcodeproj/project.pbxproj b/Buildasaur.xcodeproj/project.pbxproj index 1f3087a..83933f3 100644 --- a/Buildasaur.xcodeproj/project.pbxproj +++ b/Buildasaur.xcodeproj/project.pbxproj @@ -40,7 +40,6 @@ 3A756DC51BAB425E00508B69 /* BuildaHeartbeatKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3A756DBD1BAB425E00508B69 /* BuildaHeartbeatKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 3A756DCB1BAB42C200508B69 /* Heartbeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A756DCA1BAB42C200508B69 /* Heartbeat.swift */; }; 3A756DCC1BAB44A200508B69 /* BuildaHeartbeatKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A756DBD1BAB425E00508B69 /* BuildaHeartbeatKit.framework */; }; - 3A7F0CBF1BC14E640079A511 /* BuildasaurUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A7F0CBE1BC14E640079A511 /* BuildasaurUITests.swift */; }; 3A7F0CC81BC1508C0079A511 /* GeneralTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A7F0CC71BC1508C0079A511 /* GeneralTests.swift */; }; 3A81BB191B5A77E9004732CD /* BuildaKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A81BB181B5A77E9004732CD /* BuildaKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3A81BB201B5A77E9004732CD /* BuildaKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A81BB161B5A77E9004732CD /* BuildaKit.framework */; }; @@ -130,6 +129,9 @@ 3AE0AB2B1BB991AB00A52D20 /* SyncerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE0AB2A1BB991AB00A52D20 /* SyncerViewModel.swift */; }; 3AE4F6CE1BBC88450006CA1C /* RACUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE4F6CD1BBC88450006CA1C /* RACUtils.swift */; }; 3AE4F6D01BBC8D250006CA1C /* EmptyProjectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE4F6CF1BBC8D250006CA1C /* EmptyProjectViewController.swift */; }; + 3AE8B79B1C52DAD20033F6EF /* Buildasaur-format-2-example2 in Resources */ = {isa = PBXBuildFile; fileRef = 3AE8B79A1C52DAD20033F6EF /* Buildasaur-format-2-example2 */; }; + 3AED13131C529BB600E3B7FF /* Buildasaur-format-3-example1 in Resources */ = {isa = PBXBuildFile; fileRef = 3AED13121C529BB600E3B7FF /* Buildasaur-format-3-example1 */; }; + 3AED13151C52A1A300E3B7FF /* SecurePersistence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AED13141C52A1A300E3B7FF /* SecurePersistence.swift */; }; 3AF090B81B1134AA0058567F /* BranchWatchingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF090B71B1134AA0058567F /* BranchWatchingViewController.swift */; }; 3AF1B1241AAC7CA500917EF3 /* SyncerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF1B1231AAC7CA500917EF3 /* SyncerViewController.swift */; }; 723E971AA98B199C70B7C3AA /* Pods_BuildaHeartbeatKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 406E01BAFEA2D2588BFD2D5A /* Pods_BuildaHeartbeatKit.framework */; }; @@ -145,13 +147,6 @@ remoteGlobalIDString = 3A756DBC1BAB425E00508B69; remoteInfo = BuildaHeartbeatKit; }; - 3A7F0CC11BC14E640079A511 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 3A5687681A3B93BD0066DB2B /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3A56876F1A3B93BD0066DB2B; - remoteInfo = Buildasaur; - }; 3A81BB211B5A77E9004732CD /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 3A5687681A3B93BD0066DB2B /* Project object */; @@ -269,9 +264,6 @@ 3A756DBF1BAB425E00508B69 /* BuildaHeartbeatKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BuildaHeartbeatKit.h; sourceTree = ""; }; 3A756DC11BAB425E00508B69 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3A756DCA1BAB42C200508B69 /* Heartbeat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Heartbeat.swift; sourceTree = ""; }; - 3A7F0CBC1BC14E640079A511 /* BuildasaurUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BuildasaurUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 3A7F0CBE1BC14E640079A511 /* BuildasaurUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BuildasaurUITests.swift; sourceTree = ""; }; - 3A7F0CC01BC14E640079A511 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3A7F0CC71BC1508C0079A511 /* GeneralTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneralTests.swift; sourceTree = ""; }; 3A81BB161B5A77E9004732CD /* BuildaKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BuildaKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3A81BB181B5A77E9004732CD /* BuildaKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BuildaKit.h; sourceTree = ""; }; @@ -354,6 +346,9 @@ 3AE0AB2A1BB991AB00A52D20 /* SyncerViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncerViewModel.swift; sourceTree = ""; }; 3AE4F6CD1BBC88450006CA1C /* RACUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RACUtils.swift; sourceTree = ""; }; 3AE4F6CF1BBC8D250006CA1C /* EmptyProjectViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmptyProjectViewController.swift; sourceTree = ""; }; + 3AE8B79A1C52DAD20033F6EF /* Buildasaur-format-2-example2 */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "Buildasaur-format-2-example2"; path = "Migration/Buildasaur-format-2-example2"; sourceTree = ""; }; + 3AED13121C529BB600E3B7FF /* Buildasaur-format-3-example1 */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "Buildasaur-format-3-example1"; path = "Migration/Buildasaur-format-3-example1"; sourceTree = ""; }; + 3AED13141C52A1A300E3B7FF /* SecurePersistence.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecurePersistence.swift; sourceTree = ""; }; 3AF090B71B1134AA0058567F /* BranchWatchingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BranchWatchingViewController.swift; sourceTree = ""; }; 3AF1B1231AAC7CA500917EF3 /* SyncerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncerViewController.swift; sourceTree = ""; }; 406E01BAFEA2D2588BFD2D5A /* Pods_BuildaHeartbeatKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BuildaHeartbeatKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -393,13 +388,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 3A7F0CB91BC14E640079A511 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; 3A81BB121B5A77E9004732CD /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -487,7 +475,6 @@ isa = PBXGroup; children = ( 3A5687721A3B93BD0066DB2B /* Buildasaur */, - 3A7F0CBD1BC14E640079A511 /* BuildasaurUITests */, 3A81BB171B5A77E9004732CD /* BuildaKit */, 3A81BB251B5A77E9004732CD /* BuildaKitTests */, 3AAF6EE51A3CE5BA00C657FB /* BuildaGitServer */, @@ -508,7 +495,6 @@ 3A81BB161B5A77E9004732CD /* BuildaKit.framework */, 3A81BB1F1B5A77E9004732CD /* BuildaKitTests.xctest */, 3A756DBD1BAB425E00508B69 /* BuildaHeartbeatKit.framework */, - 3A7F0CBC1BC14E640079A511 /* BuildasaurUITests.xctest */, ); name = Products; sourceTree = ""; @@ -579,15 +565,6 @@ path = BuildaHeartbeatKit; sourceTree = ""; }; - 3A7F0CBD1BC14E640079A511 /* BuildasaurUITests */ = { - isa = PBXGroup; - children = ( - 3A7F0CBE1BC14E640079A511 /* BuildasaurUITests.swift */, - 3A7F0CC01BC14E640079A511 /* Info.plist */, - ); - path = BuildasaurUITests; - sourceTree = ""; - }; 3A81BB171B5A77E9004732CD /* BuildaKit */ = { isa = PBXGroup; children = ( @@ -634,9 +611,11 @@ 3A9D741E1BCBF86900DCA23C /* Migration */ = { isa = PBXGroup; children = ( - 3A9D74251BCC19BB00DCA23C /* Buildasaur-format-2-example1 */, - 3A9D74231BCC103E00DCA23C /* Buildasaur-format-1-example1 */, 3A9D74211BCC041600DCA23C /* Buildasaur-format-0-example1 */, + 3A9D74231BCC103E00DCA23C /* Buildasaur-format-1-example1 */, + 3A9D74251BCC19BB00DCA23C /* Buildasaur-format-2-example1 */, + 3AE8B79A1C52DAD20033F6EF /* Buildasaur-format-2-example2 */, + 3AED13121C529BB600E3B7FF /* Buildasaur-format-3-example1 */, 3A9D741F1BCBF87900DCA23C /* MigrationTests.swift */, ); name = Migration; @@ -748,6 +727,7 @@ 3ACBADE71B5ADE2A00204457 /* StorageManager.swift */, 3A9D741C1BCBDDA200DCA23C /* PersistenceMigrator.swift */, 3A395B541BCF007000BB6947 /* LoginItem.swift */, + 3AED13141C52A1A300E3B7FF /* SecurePersistence.swift */, ); name = Persistence; sourceTree = ""; @@ -936,24 +916,6 @@ productReference = 3A756DBD1BAB425E00508B69 /* BuildaHeartbeatKit.framework */; productType = "com.apple.product-type.framework"; }; - 3A7F0CBB1BC14E640079A511 /* BuildasaurUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 3A7F0CC61BC14E640079A511 /* Build configuration list for PBXNativeTarget "BuildasaurUITests" */; - buildPhases = ( - 3A7F0CB81BC14E640079A511 /* Sources */, - 3A7F0CB91BC14E640079A511 /* Frameworks */, - 3A7F0CBA1BC14E640079A511 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 3A7F0CC21BC14E640079A511 /* PBXTargetDependency */, - ); - name = BuildasaurUITests; - productName = BuildasaurUITests; - productReference = 3A7F0CBC1BC14E640079A511 /* BuildasaurUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; 3A81BB151B5A77E9004732CD /* BuildaKit */ = { isa = PBXNativeTarget; buildConfigurationList = 3A81BB331B5A77E9004732CD /* Build configuration list for PBXNativeTarget "BuildaKit" */; @@ -1062,10 +1024,6 @@ CreatedOnToolsVersion = 7.0; DevelopmentTeam = 7BJ2984YDK; }; - 3A7F0CBB1BC14E640079A511 = { - CreatedOnToolsVersion = 7.0.1; - TestTargetID = 3A56876F1A3B93BD0066DB2B; - }; 3A81BB151B5A77E9004732CD = { CreatedOnToolsVersion = 7.0; DevelopmentTeam = 7BJ2984YDK; @@ -1097,7 +1055,6 @@ projectRoot = ""; targets = ( 3A56876F1A3B93BD0066DB2B /* Buildasaur */, - 3A7F0CBB1BC14E640079A511 /* BuildasaurUITests */, 3A81BB151B5A77E9004732CD /* BuildaKit */, 3A81BB1E1B5A77E9004732CD /* BuildaKitTests */, 3AAF6EE31A3CE5BA00C657FB /* BuildaGitServer */, @@ -1125,13 +1082,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 3A7F0CBA1BC14E640079A511 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; 3A81BB141B5A77E9004732CD /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -1144,8 +1094,10 @@ buildActionMask = 2147483647; files = ( 3A9D74221BCC041600DCA23C /* Buildasaur-format-0-example1 in Resources */, + 3AED13131C529BB600E3B7FF /* Buildasaur-format-3-example1 in Resources */, 3ACBADDD1B5ADE1400204457 /* sampleFinishedIntegration.json in Resources */, 3A9D74241BCC103E00DCA23C /* Buildasaur-format-1-example1 in Resources */, + 3AE8B79B1C52DAD20033F6EF /* Buildasaur-format-2-example2 in Resources */, 3A9D74261BCC19BB00DCA23C /* Buildasaur-format-2-example1 in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1438,14 +1390,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 3A7F0CB81BC14E640079A511 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3A7F0CBF1BC14E640079A511 /* BuildasaurUITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 3A81BB111B5A77E9004732CD /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1455,6 +1399,7 @@ 3A0FF5A41BBFF9FA00FB8051 /* ProjectConfig.swift in Sources */, 3ACBAE0E1B5ADE2A00204457 /* SyncPair_PR_NoBot.swift in Sources */, 3ACF93AA1BBEC7AB00CD888C /* XcodeScheme.swift in Sources */, + 3AED13151C52A1A300E3B7FF /* SecurePersistence.swift in Sources */, 3A28AF531BC984850011756E /* ConfigTriplet.swift in Sources */, 3ACBADFD1B5ADE2A00204457 /* CommonExtensions.swift in Sources */, 3ACBAE131B5ADE2A00204457 /* SyncPairResolver.swift in Sources */, @@ -1554,11 +1499,6 @@ target = 3A756DBC1BAB425E00508B69 /* BuildaHeartbeatKit */; targetProxy = 3A756DC21BAB425E00508B69 /* PBXContainerItemProxy */; }; - 3A7F0CC21BC14E640079A511 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 3A56876F1A3B93BD0066DB2B /* Buildasaur */; - targetProxy = 3A7F0CC11BC14E640079A511 /* PBXContainerItemProxy */; - }; 3A81BB221B5A77E9004732CD /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 3A81BB151B5A77E9004732CD /* BuildaKit */; @@ -1916,56 +1856,6 @@ }; name = Testing; }; - 3A7F0CC31BC14E640079A511 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = BuildasaurUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - PRODUCT_BUNDLE_IDENTIFIER = com.honzadvorsky.BuildasaurUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_TARGET_NAME = Buildasaur; - USES_XCTRUNNER = YES; - }; - name = Debug; - }; - 3A7F0CC41BC14E640079A511 /* Testing */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - ENABLE_NS_ASSERTIONS = YES; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = BuildasaurUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - PRODUCT_BUNDLE_IDENTIFIER = com.honzadvorsky.BuildasaurUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_TARGET_NAME = Buildasaur; - USES_XCTRUNNER = YES; - }; - name = Testing; - }; - 3A7F0CC51BC14E640079A511 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - ENABLE_NS_ASSERTIONS = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = BuildasaurUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - PRODUCT_BUNDLE_IDENTIFIER = com.honzadvorsky.BuildasaurUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_TARGET_NAME = Buildasaur; - USES_XCTRUNNER = YES; - }; - name = Release; - }; 3A81BB2D1B5A77E9004732CD /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 17FE44590CED1491A8F03F35 /* Pods-BuildaKit.debug.xcconfig */; @@ -2232,16 +2122,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 3A7F0CC61BC14E640079A511 /* Build configuration list for PBXNativeTarget "BuildasaurUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 3A7F0CC31BC14E640079A511 /* Debug */, - 3A7F0CC41BC14E640079A511 /* Testing */, - 3A7F0CC51BC14E640079A511 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 3A81BB331B5A77E9004732CD /* Build configuration list for PBXNativeTarget "BuildaKit" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Buildasaur/AppDelegate.swift b/Buildasaur/AppDelegate.swift index e519f7f..541bfd8 100644 --- a/Buildasaur/AppDelegate.swift +++ b/Buildasaur/AppDelegate.swift @@ -68,19 +68,19 @@ class AppDelegate: NSObject, NSApplicationDelegate { let migrator = CompositeMigrator(persistence: persistence) if migrator.isMigrationRequired() { - Log.info("Migration required, launching migrator") + print("Migration required, launching migrator") do { try migrator.attemptMigration() } catch { - Log.error("Migration failed with error \(error), wiping folder...") + print("Migration failed with error \(error), wiping folder...") //wipe the persistence. start over if we failed to migrate _ = try? fileManager.removeItemAtURL(persistence.readingFolder) } - Log.info("Migration finished") + print("Migration finished") } else { - Log.verbose("No migration necessary, skipping...") + print("No migration necessary, skipping...") } } @@ -88,12 +88,12 @@ class AppDelegate: NSObject, NSApplicationDelegate { let persistence = PersistenceFactory.createStandardPersistence() - //setup logging - Logging.setup(persistence, alsoIntoFile: true) - //migration self.migratePersistence(persistence) + //setup logging + Logging.setup(persistence, alsoIntoFile: true) + //create storage manager let storageManager = StorageManager(persistence: persistence) let factory = SyncerFactory() diff --git a/Buildasaur/ProjectViewController.swift b/Buildasaur/ProjectViewController.swift index 10eb200..cd3fee9 100644 --- a/Buildasaur/ProjectViewController.swift +++ b/Buildasaur/ProjectViewController.swift @@ -80,7 +80,7 @@ class ProjectViewController: ConfigEditViewController { //dump whenever config changes prod.startWithNext { [weak self] in - self?.tokenTextField.stringValue = $0.githubToken + self?.tokenTextField.stringValue = $0.serverAuthentication ?? "" let priv = $0.privateSSHKeyPath self?.privateKeyUrl.value = priv.isEmpty ? nil : NSURL(fileURLWithPath: priv) let pub = $0.publicSSHKeyPath @@ -178,12 +178,12 @@ class ProjectViewController: ConfigEditViewController { guard let privateKeyPath = self.privateKeyUrl.value?.path, let publicKeyPath = self.publicKeyUrl.value?.path, - let githubToken = self.tokenTextField.stringValue.nonEmpty() else { + let token = self.tokenTextField.stringValue.nonEmpty() else { return nil } var config = self.projectConfig.value - config.githubToken = githubToken + config.serverAuthentication = token config.sshPassphrase = sshPassphrase config.privateSSHKeyPath = privateKeyPath config.publicSSHKeyPath = publicKeyPath diff --git a/BuildasaurUITests/BuildasaurUITests.swift b/BuildasaurUITests/BuildasaurUITests.swift deleted file mode 100644 index ed6c383..0000000 --- a/BuildasaurUITests/BuildasaurUITests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// BuildasaurUITests.swift -// BuildasaurUITests -// -// Created by Honza Dvorsky on 10/4/15. -// Copyright © 2015 Honza Dvorsky. All rights reserved. -// - -import XCTest - -class BuildasaurUITests: XCTestCase { - - override func setUp() { - super.setUp() - - // Put setup code here. This method is called before the invocation of each test method in the class. - - // In UI tests it is usually best to stop immediately when a failure occurs. - continueAfterFailure = false - // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. - XCUIApplication().launch() - - // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - -// func testCreateNewServer() { - //TODO: add a couple UI tests (how do we solve the issue of - //inputting passwords and tokens though?) - //probs: mock both github and xcode server -// } -} diff --git a/BuildasaurUITests/Info.plist b/BuildasaurUITests/Info.plist deleted file mode 100644 index ba72822..0000000 --- a/BuildasaurUITests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Podfile b/Podfile index 5379996..af6eb48 100644 --- a/Podfile +++ b/Podfile @@ -12,7 +12,7 @@ end def also_xcode_pods pods_for_errbody - pod 'XcodeServerSDK', '~> 0.5.5' + pod 'XcodeServerSDK', '~> 0.5.6' pod 'ekgclient', '~> 0.3.0' end @@ -33,6 +33,7 @@ end target 'BuildaKit' do buildasaur_app_pods + pod 'KeychainAccess' end target 'BuildaKitTests' do diff --git a/Podfile.lock b/Podfile.lock index 60b2b64..ae4bc9a 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -10,6 +10,7 @@ PODS: - Ji/Ji (1.2.0): - Ji/Ji-libxml - Ji/Ji-libxml (1.2.0) + - KeychainAccess (2.3.3) - Nimble (3.0.0) - ReactiveCocoa (4.0.0-RC.1): - ReactiveCocoa/UI (= 4.0.0-RC.1) @@ -24,7 +25,7 @@ PODS: - Result (~> 1.0) - Result (1.0.1) - SwiftSafe (0.1) - - XcodeServerSDK (0.5.5): + - XcodeServerSDK (0.5.6): - BuildaUtils (~> 0.2.3) DEPENDENCIES: @@ -32,9 +33,10 @@ DEPENDENCIES: - CryptoSwift - ekgclient (~> 0.3.0) - Ji (~> 1.2.0) + - KeychainAccess - Nimble (~> 3.0.0) - ReactiveCocoa (= 4.0.0-RC.1) - - XcodeServerSDK (~> 0.5.5) + - XcodeServerSDK (~> 0.5.6) SPEC CHECKSUMS: Alamofire: 39dddb7d3725d1771b1d2f7099c8bd45bd83ffbb @@ -42,10 +44,11 @@ SPEC CHECKSUMS: CryptoSwift: d382228d6301c09474132417878a741c2a2e68cd ekgclient: 40f5d347e2ede450b3e50ac7c6bd84d96e7b84ad Ji: ddebb22f9ac445db6e884b66f78ea74fb135fdb7 + KeychainAccess: 9b7e49e48277e329b1b3195e54697ed313d30acf Nimble: 4c353d43735b38b545cbb4cb91504588eb5de926 ReactiveCocoa: 2b0f654beb7642b82cfd3fdb845205ae9889422c Result: caef80340451e1f07492fa1e89117f83613bce24 SwiftSafe: 77ffd12b02678790bec1ef56a2d14ec5036f1fd6 - XcodeServerSDK: f56b521e016a1efd593dda649535eea254d41ec3 + XcodeServerSDK: 6300badc4a799da9ad6e970b366eda18d4a47bda COCOAPODS: 0.39.0