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

More advanced extraFiles #650

Closed
ha-D opened this issue Aug 6, 2016 · 2 comments · May be fixed by qcif/data-curator#563
Closed

More advanced extraFiles #650

ha-D opened this issue Aug 6, 2016 · 2 comments · May be fixed by qcif/data-curator#563
Labels

Comments

@ha-D
Copy link
Contributor

ha-D commented Aug 6, 2016

I have a project structure such as below:

└── MainProject
    ├── OtherProject
    │   ├── app
    │   └── dist
    ├── app
    └── dist

Where OtherProject is a separate project with its own git repository. I want to have the binary outputs of OtherProject to be included in the MainProject bundle, I'm using the extraFiles option to do so. The directory structure I want to get from my build is (for osx):

└── Contents
    ├── Frameworks
    ├── Info.plist
    ├── MacOS
    │   ├── mainproject
    │   └── otherproject
    └── Resources

But since extraFiles copies everything with the original directory structure relative to the project root, I can only get:

└── Contents
    ├── Frameworks
    ├── Info.plist
    ├── MacOS
    │   └── mainproject
    ├── OtherProject
    │   └── dist
    │       └── otherproject
    └── Resources

Although it's possible to get the app content structure I want by restructuring the directories before build, it's kind of an inconvenience.

I propose that aside from the glob patterns, extraFiles also accepts JSON objects with a structure such as:

{
  "from": "path/to/src",
  "to": "path/to/dst",
  "filter": ["glob patterns"]
}

Where from specifies the base directory to be copied from relative to the project root, to specifies the directory to be copied to relative to the app's content directory and filter specifies patterns to match when copying.

This would effectively solve issue #597 as well, as from can be a parent directory.

If you approve of this, I could send a pull request myself.

@develar
Copy link
Member

develar commented Aug 6, 2016

Related #644 (comment)

@develar develar added the feature label Aug 6, 2016
@develar
Copy link
Member

develar commented Aug 6, 2016

👍 PR welcome.

  • os and arch patterns should be supported in the from and to
  • to is optional — defaults to app contents (as now).
  • from is also optional — defaults to project dir (as now).

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

Successfully merging a pull request may close this issue.

2 participants