Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blueprint file fails to validate #172

Closed
grantjk opened this issue Oct 14, 2015 · 13 comments
Closed

Blueprint file fails to validate #172

grantjk opened this issue Oct 14, 2015 · 13 comments

Comments

@grantjk
Copy link

grantjk commented Oct 14, 2015

Similar to #140, I'm running into an issue where Buildasaur 0.6 fails to validate the blueprint file. I've confirmed that a blueprint file exists in the .xcworkspace/xcshareddata directory. I've also added the old xccheckout file as well.

The only thing that's different in this project that I can tell from the other projects I have is that there are two repos listed in the blueprint and the checkout file. I don't know why, and I don't know how to tell Xcode to ignore the irrelevant one. (if you have any tips, that would be great).

@Brett-Best
Copy link
Contributor

Hello @grantjk are you using two remotes?

@grantjk
Copy link
Author

grantjk commented Oct 14, 2015

Not according to .git/config. Not sure why Xcode things there's 2

@Brett-Best
Copy link
Contributor

Hmmm can you post the blueprint? If you view the remotes in Xcode does it display two of them?

@czechboy0
Copy link
Member

@grantjk This shouldn't be a problem, because the way Buildasaur parses the files is that it only picks the primary remote anyway. How does it fail? When adding the project does Buildasaur reject it?

@grantjk
Copy link
Author

grantjk commented Oct 14, 2015

It fails here when I try to add the workspace file

@grantjk
Copy link
Author

grantjk commented Oct 14, 2015

I created a bot through Xcoce already and it runs fine

@czechboy0
Copy link
Member

One question - can you make sure that the blueprint/checkout files are in the workspace, if you're adding the workspace to Buildasaur, or in the project if you're adding the project? It only looks inside the file you give it: project vs workspace. That might be the reason why you have the required files, just in the other project/workspace file.

@grantjk
Copy link
Author

grantjk commented Oct 14, 2015

Definitely in the workspace:

~/path-to-proj/ProjectName.xcworkspace/xcshareddata$ lsa
total 24
drwxr-xr-x  5 twg  staff   170B 14 Oct 08:43 .
drwxr-xr-x  5 twg  staff   170B 13 Oct 22:08 ..
-rw-r--r--  1 twg  staff   1.9K 14 Oct 08:43 ProjectName.xccheckout
-rw-r--r--  1 twg  staff   1.1K 13 Oct 22:42 ProjectName.xcscmblueprint
-rw-r--r--  1 twg  staff   264B 13 Oct 22:03 WorkspaceSettings.xcsettings

Here's the (obfuscated) blueprint file:

{
  "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "token",
  "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
  },
  "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
    "token" : 0,
  },
  "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "identifier",
  "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
    "token" : "repo-name"
  },
  "DVTSourceControlWorkspaceBlueprintNameKey" : "ProjectName",
  "DVTSourceControlWorkspaceBlueprintVersion" : 204,
  "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "ProjectName.xcworkspace",
  "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
    {
      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "ssh:\/\/github.com\/repo",
      "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "identifier"
    }
  ]
}

@czechboy0
Copy link
Member

Hmm if you have Buildasaur running in the debugger, please try to see exactly what is failing, it might be actually failing to parse the file (but it's finding it).

For one thing, I don't think DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey should start with ssh. Buildasaur's SSH URL is github.com:czechboy0/Buildasaur.git, for instance.

@grantjk
Copy link
Author

grantjk commented Oct 14, 2015

@czechboy0 That was it. Not sure why Xcode would have generated the url that way...

🤷

@czechboy0
Copy link
Member

So it works? 👍

@grantjk
Copy link
Author

grantjk commented Oct 14, 2015

Yup. Works now. The error was parsing that url: here

Again, not sure why Xcode things that's the url...

@czechboy0
Copy link
Member

Yeah I've never seen that either. Well, glad it works! (Make sure to commit the blueprint in your repo if you haven't already.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants