Skip to content
This repository has been archived by the owner on Mar 19, 2019. It is now read-only.

Copy a file in, with correct permissions #13

Closed
jessitron opened this issue Nov 30, 2016 · 8 comments
Closed

Copy a file in, with correct permissions #13

jessitron opened this issue Nov 30, 2016 · 8 comments
Assignees
Labels

Comments

@jessitron
Copy link
Contributor

Currently to inject a file into a project using an editor, the contents come from a velocity template.
I've been adding ".vm" to filenames and using this as a way to copy files in. However, when the script.vm file is executable, the resulting file in the project is still not.

A "copy file from rug archive to project" (without that file being in the generated project) would be nice.

@kipz kipz added the bug label Dec 2, 2016
@kipz
Copy link
Contributor

kipz commented Dec 5, 2016

There are other methods to get files out of the .atomist/ folder on the ProjectMutableView - such as copyEditorBackingFileOrFail etc. At least you're not having to pretend they are Velocity templates!

No idea if this has the same issue though...

@kipz
Copy link
Contributor

kipz commented Dec 5, 2016

@alankstewart I think this is related to https://github.com/atomist/artifact-source

Currently FileArtifact doesn't model permissions, so I think this'll need to be added before we can do much more on this.

correction: FileArtifact has a mode field representing the unix permissions mask as an int.

@jessitron-stripe
Copy link
Contributor

@kipz does copyEditorBackingFile pull one from the generator's files? like the top-level project directory?
I am actually pretending my files are velocity templates at the moment. Because I want to add a file that is not in the original project.

@kipz
Copy link
Contributor

kipz commented Dec 5, 2016

I use it pull files from .atomist/templates/ that are not Velocity templates.

In my editor, I have all possible OSS license file types, and copy the appropriate one using that method, rather than the VM.

If you want to generate an entirely new file, you can do that too via the ProjectMutableView.

I'm not sure if that answers your question?

@kipz
Copy link
Contributor

kipz commented Dec 6, 2016

I created a test that does not manage to recreate this issue.

Any chance you could point us at the offending editor @jessitron?

@kipz
Copy link
Contributor

kipz commented Dec 6, 2016

@kipz
Copy link
Contributor

kipz commented Dec 9, 2016

@jessitron can you confirm this is working for you now please?

@jessitron
Copy link
Contributor Author

it is!

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

No branches or pull requests

4 participants