Skip to content

Added support for derivedDataPath.#1143

Merged
mdiep merged 1 commit intoCarthage:masterfrom
bartoszj:derivedData
Mar 31, 2016
Merged

Added support for derivedDataPath.#1143
mdiep merged 1 commit intoCarthage:masterfrom
bartoszj:derivedData

Conversation

@bartoszj
Copy link
Copy Markdown
Contributor

Hi,

I've added support for -derivedDataPath option for xcodebuild. With this option it would be possible to separate derived data folders between e.g. Jenkins jobs, or users could select own derived data folder and remove it after the frameworks have been built.

Comment thread Source/carthage/Build.swift Outdated
return create
<*> m <| Option(key: "configuration", defaultValue: "Release", usage: "the Xcode configuration to build")
<*> m <| Option(key: "platform", defaultValue: .All, usage: "the platforms to build for (one of ‘all’, ‘Mac’, ‘iOS’, ‘watchOS’, 'tvOS', or comma-separated values of the formers except for ‘all’)")
<*> m <| Option(key: "derived-data", defaultValue: "", usage: "path to the custom derived data folder")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This default value should be nil and derivedDataPath should be String?.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I use nil and String I receive an error:

Missing argument for --derived-data

According to the specification:

If this is nil, this option is always required.

Is there any workaround for this, or maybe I'm doing something wrong?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take another look and get back to you. Sorry!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it stands, Commandant doesn't support that. I've opened a PR that would make it possible. Let's give it a few days to see what comes of that.

@mdiep
Copy link
Copy Markdown
Member

mdiep commented Feb 23, 2016

Thanks for the pull request!

I left a few notes that will require some changes. Leave a comment when you've addressed them and I'll take another look. ☺️

@bartoszj
Copy link
Copy Markdown
Contributor Author

@mdiep
I've made some changes. Unfortunately I'm not very familiar with the code and I've no idea hot tow fix the default nil value for derived-data. If you can give me a hint, maybe I'll be able to fix it.

@bartoszj
Copy link
Copy Markdown
Contributor Author

I've updated my code to use Commandant 0.9 and the optional values.

@mdiep
Copy link
Copy Markdown
Member

mdiep commented Mar 31, 2016

That's great! Thanks for updating it and for being patient!

@mdiep mdiep merged commit 63ed2b9 into Carthage:master Mar 31, 2016
@bartoszj bartoszj deleted the derivedData branch March 31, 2016 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants