Skip to content

Commit

Permalink
fixes for new OS X Server 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Honza Dvorsky committed Apr 12, 2015
1 parent f0cb908 commit 94a7639
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
6 changes: 5 additions & 1 deletion BuildaCIServer/SourceControlBlueprint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ public class SourceControlBlueprint : XcodeServerEntity {

let repoId = self.projectWCCIdentifier
let remoteUrl = self.projectURL
let workingCopyPath = self.projectName
var workingCopyPath = self.projectName
//ensure a trailing slash
if !workingCopyPath.hasSuffix("/") {
workingCopyPath = workingCopyPath + "/"
}
let relativePathToProject = self.projectPath
let blueprintName = self.wCCName
let branch = self.branch
Expand Down
22 changes: 21 additions & 1 deletion Buildasaur/LocalSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,27 @@ public class LocalSource : JSONSerializable {
var projectURL: NSURL? {
get {
if let urlString = self.pullValueForKey("IDESourceControlProjectURL") {
return NSURL(string: urlString)

var finalUrlString = urlString
let type = self.checkoutType!
if type == .SSH {
if !finalUrlString.hasPrefix("git@") {
finalUrlString = "git@\(finalUrlString)"
}
}

return NSURL(string: finalUrlString)
}
return nil
}
}

var checkoutType: AllowedCheckoutTypes? {
get {
if
let meta = self.workspaceMetadata,
let type = LocalSource.parseCheckoutType(meta) {
return type
}
return nil
}
Expand Down
3 changes: 2 additions & 1 deletion Buildasaur/XcodeLocalSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ extension LocalSource {
let projectWCCIdentifier = self.projectWCCIdentifier!
let wccName = self.projectWCCName!
let projectName = self.projectName!
let projectURL = self.projectURL!.absoluteString!
let projectURLOrig = self.projectURL!
let projectURL = projectURLOrig.absoluteString!
let projectPath = self.projectPath!
let publicSSHKey = self.publicSSHKey
let privateSSHKey = self.privateSSHKey
Expand Down

0 comments on commit 94a7639

Please sign in to comment.