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

Monorepo support #220

Open
gdoermann opened this issue Aug 25, 2023 · 4 comments
Open

Monorepo support #220

gdoermann opened this issue Aug 25, 2023 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@gdoermann
Copy link

I can find no way to have bumpver still commit even if it is in a subdirectory of a monorepo. It would be great if I could specify what version control (eg. git) I am using and then instead of resolving the version control, it simply tries to commit. Currently I get a warning every time saying bumpver can't find the version control, so it is skipping the commit.

@mbarkhau
Copy link
Owner

I'm not sure what to do with this problem description. Can you be more detailed/precise with your request?

@gdoermann
Copy link
Author

So here is an example:

monorepo
├── .git
├── devops
├── docs
├── libs
└── projects
├── project1
├── project2
└── project3

If I had a pyproject.toml file in each of the project folders, if I do a version bump bumpver does not recognize that I am within a git repository as I am a couple of directories into the repo.

Another way mono repo support could be improved is if you could specify the .toml file to use for configuration when running bumpver (eg bumpver --config=project1.toml .... I have a ton of libraries, lambda layers, etc that I have to version bump periodically. I need to bump the version of the package and THEN I need to bump the version in all of the requirements.txt files that require that package. Right now each package has it's own pyproject.toml file and I specify and manage versions there. Bumping the versions in all of the projects that use that library is another use case. I just think some of the tools you have already built could be extended to be useful for also bumping the requirement versions.

Thanks for the package BTW! Super useful!

@mbarkhau
Copy link
Owner

mbarkhau commented Oct 3, 2023

Thanks for the update. The --config=<path> parameter does indeed sound like a nice solution to this.

I won't be working on this for a while, so if anybody wants to work on a PR, I'd be happy to accept it.

@mbarkhau
Copy link
Owner

I've looked at this a bit more closely and a possible implementation could look like this.

  • A bumpver.toml or .bumpver.toml file would need to added to the project sub-directory.
  • Just to make things explicit, the config would specify monorepo_dir = "..".
  • If in monorepo mode, a project identifier needs to be determined (e.g. via the directory name) or specified (via a config parameter project_id).
  • Only version tagsx which use the project identifier as a prefix may be parsed.
  • Version tags that are generated must include the project identifier as a prefix.

If anybody wants to take this on, please let me know.

@mbarkhau mbarkhau added enhancement New feature or request good first issue Good for newcomers labels Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants