juju / charmstore-client

Client for charmstore.
Other
9 stars 22 forks source link

.charmignore would be a great enhancement #201

Open rogpeppe opened 5 years ago

rogpeppe commented 5 years ago

From @bac on January 7, 2016 21:13

Some charms create some artifacts as part of the test procedure that you don't want to upload. They can be cleaned out before uploading but only if you're makefile targets are nicely separated.

It would be a very good enhancement to have the analog of .gitignore to list files and directories to be ignored, just like VCS directories are currently ignored on uploading.

Copied from original issue: CanonicalLtd/charmstore-client#156

rogpeppe commented 5 years ago

From @frankban on January 20, 2016 13:14

I think that currently all hidden files and dirs are ignored, but this idea sounds good Brad.

rogpeppe commented 5 years ago

From @bac on January 20, 2016 20:3

@urosj mentioned that @jrwren was working on a branch to not upload files in .gitignore (and presumably .bzrignore too). Giving that some thought, it seems that might cover the use case for a .charmignore.

The motivation for this issue was publishing juju-gut-charm and having to ensure tests/download-cache was empty before publishing. But, that directory is in .gitignore, as would most artifacts.

The handling of .charmignore would be trivial if the logic were in place for ignore .gitignore, but is it worth the extra confusion?

rogpeppe commented 5 years ago

From @bac on January 20, 2016 20:10

It looks like I was wrong about the work being started for .gitignore.

rogpeppe commented 5 years ago

From @frankban on January 21, 2016 8:19

I think we should not conflate the two. .charmignore could allow artifacts that are included in .gitignore. For instance, in the juju-gui charm, the release tarball is required for the charm, but still it's good to have the whole releases directory ignored by git. Not uploading the releases directory to the charm store would result in a broken charm. For the time being, we could just suggest to put not required (for the charm store) artifacts in hidden directories or in the build/ directory, as these locations are already ignored in the archive+upload process.