Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

New feature: build without 'src' directory #33

Open
mever opened this issue Jan 21, 2015 · 1 comment
Open

New feature: build without 'src' directory #33

mever opened this issue Jan 21, 2015 · 1 comment

Comments

@mever
Copy link

mever commented Jan 21, 2015

It would be nice to build a charm without 'src' directory. If I build my project with gocharm the resulting directory looks like this:

11M     bin
12K     config.yaml
172K    hooks
12K     metadata.yaml
12K     README.md
86M     src

However the source directory takes 86 MB and isn't really necessary for the charm. Without it the charm is in total around 11 MB. If I remove it and upgrade the charm it works perfectly without it. So do we really need this directory?

If you like I can donate some time for a PR to add a build flag. Copying the 'assets' (

if _, err := os.Stat(filepath.Join(destPkgDir, "assets")); err == nil {
) folder if there is one.

The reason why my source directory is so large is because it also has some files that are not compiled into the binary. But none the less it seems like a nice feature to have.

@rogpeppe
Copy link
Contributor

rogpeppe commented Aug 3, 2015

Thanks for raising this issue.

I'd accept a PR that added a -no-source flag that caused the source package
directory copying to be omitted.

If specified and the assets directory exists in the package source, instead of
symlinking the assets directory, it would just create a direct copy in the top level
of the charm directory.

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

No branches or pull requests

2 participants