rebar3_hex icon indicating copy to clipboard operation
rebar3_hex copied to clipboard

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

Open tothlac opened this issue 1 year ago • 2 comments

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 avatar May 09 '23 16:05 tothlac