Skip to content

Don't copy exported files in relative path #4803

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

Closed
wants to merge 1 commit into from
Closed

Don't copy exported files in relative path #4803

wants to merge 1 commit into from

Conversation

johanstokking
Copy link
Contributor

Signed-off-by: Johan Stokking [email protected]

Description

Closes #4802

Status

READY

Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

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

Well done!

@theotherjimmy
Copy link
Contributor

/morph export-build

@johanstokking
Copy link
Contributor Author

Note: this may not be the most elegant way to fix #4802, although it doesn't make sense to copy files from a relative subdirectory to the project root in my opinion.

What could be more elegant is an indicator for static files that need to be copied to project root instead of copying everything that is not in project root (introduced here: #4544)

@theotherjimmy
Copy link
Contributor

Yeah, You are using isabs as the check for static files. We could add a bit of structure to bind the "has this file been moved into the users workspace" to the path, or we could use separate lists. I'm pretty sure I like the former method.

@johanstokking
Copy link
Contributor Author

I think it would be best to assume that generated_files are generated already, and to keep a separate list of files that should be copied.

Now, the two static files are added to generated_files (

self.generated_files = [join(self.TEMPLATE_DIR, "GettingStarted.html"),
join(self.TEMPLATE_DIR, ".mbed")]
).

Cleaner than this solution is maybe introducing an copy_files list with those static files and only copy those?

@theotherjimmy
Copy link
Contributor

@johanstokking Yes. I would appreciate it if you could change the implementation. Alternatively, I could do it too.

@johanstokking
Copy link
Contributor Author

johanstokking commented Jul 24, 2017

@theotherjimmy done, see #4804

@sg- sg- removed the needs: CI label Jul 24, 2017
@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph export-build

Output

mbed Build Number: 92

All exports and builds passed!

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.

4 participants