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

Support for including all files under version control in the created package #327

Open
tothlac opened this issue May 9, 2023 · 2 comments

Comments

@tothlac
Copy link

tothlac commented May 9, 2023

We are in the middle of moving all of our repositories from our internal bitbucket server to our internal hex server, because we want to use semver versioning for the dependencies.

Our problem is that we have lots of repositories, and in some of them there are files stored in special folders. I'm afraid that we will forget about these special directories, then it will cause a problem not in the build of the current repository but in some other projects using this repo as a dependency.

I was thinking of adding --inclulde_all_vcs=true command line option to rebar3 hex build, so in this case all files under version control will be copied into the generated package, but nothing else... Only those files.

I'm aware of the fact, this way some unnecessary files will be included as well, for instance the entire test directory, which can potentially contain huge amount of testing related data. For that we can use an exclude_paths option in rebar.config, like this:

{hex, [
   {exclude_paths, ["test", ...]},
   {repos, [
   ]}
]}.

In the initial version maybe I would like to support only git, svn, and some others.... Of course it would not change the default behaviour of the plugin, because using it without the --include_all_vcs option it would work entirely the same way.

What is your opinion about this?

@tothlac tothlac changed the title Support for copying all files under version control Support for including all files under version control in the created package May 9, 2023
@tothlac
Copy link
Author

tothlac commented May 10, 2023

We can also use the exclude_files option already used in the app.src file.

@starbelly
Copy link
Member

I'm not sure, I need to think on this a bit. While it seems to solve a problem, it feels a bit niche and can ultimately be haphazard.

Have you thought about using include_paths to solve your problem? You'll have to be diligent, if you will, about keeping exclude_paths up to date, so why not use include_paths coupled with building the package and inspecting the contents before a publish?

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