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

Allow hidden files such as .gitignore to show up in the template zip #151

Open
steveash opened this issue Apr 22, 2015 · 3 comments
Open

Comments

@steveash
Copy link

I would like my template to go ahead and create a default .gitignore file for the new project. I added a .gitignore file to my template folder, but it doesn't show up in the template zip (and thus obviously not when I create the project from the template.

The workaround I'm using right now is to include a gignore.txt in the template zip and then in the lazybones.groovy I rename the file to .gitignore

@pledbrook
Copy link
Owner

Is this an issue with the Gradle plugin? I thought it might be one of the default package exclusions, but it's not. Which means that file should be packaged.

An alternative approach is to use the scmExclusions() method in the post-install script to specify the ignore patterns. This works in combination with the --with-git command line option to create a .gitignore file and initialise a git repository.

@pledbrook
Copy link
Owner

I tested this with a very simple Gradle build and discovered that the built-in Zip task seems to ignore the .gitignore file. An arbitrary hidden file, such as .hiddenFile, is included in the zip package though. Bizarre. Possibly a bug in the Zip task.

@pledbrook
Copy link
Owner

Check out GRADLE-1883 for a workaround. It's ugly, but the only solution until Gradle gets an option to disable the defaults.

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

No branches or pull requests

2 participants