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 package configuration in the package's directory #1022

Open
epage opened this issue Oct 6, 2023 · 7 comments · May be fixed by #1082
Open

Support package configuration in the package's directory #1022

epage opened this issue Oct 6, 2023 · 7 comments · May be fixed by #1082
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@epage
Copy link

epage commented Oct 6, 2023

Motivations

When working in larger workspaces, its much easier to have a package be an atomic unit that you can then copy, etc. This doesn't jive with having all of the config in a central file.

  • Would you like to implement this feature? maybe

Solution

Support a config file in the package's directory, whether that be release-plz.toml or the Cargo.tomls package.metadata.release-plz.

Alternatives

Additional context

See #1019

@epage epage added the enhancement New feature or request label Oct 6, 2023
@MarcoIeni
Copy link
Owner

This is a great idea! The package-level configuration should support the options listed here, except "name", which is inferred by the directory where release-plz.toml is placed or Cargo.toml file.
PR welcome!

@MarcoIeni MarcoIeni added good first issue Good for newcomers help wanted Extra attention is needed labels Oct 7, 2023
@orhun
Copy link
Sponsor Contributor

orhun commented Oct 16, 2023

I would like to work on this feature ✋🏼 feel free to assign it to me!

@MarcoIeni
Copy link
Owner

Sure thing, thanks Orhun!

@MarcoIeni
Copy link
Owner

MarcoIeni commented Oct 16, 2023

You can extract package metadata with this. Also feel free to raise two PRs:

  • one to support package metadata
  • one to support local release-plz.toml

Or just one of the two is fine. I would avoid having one PR for both features to minimize PR length 👍

EDIT:

Requirements

  • if workspace is duplicated among metadata and release-plz.toml, throw an error.
  • If a package config is both present in release-plz.toml and cargo metadata, throw an error.

@orhun
Copy link
Sponsor Contributor

orhun commented Nov 22, 2023

I created a draft PR at #1082 - please check.

About the requirements, how it works is it first checks the current directory for release-plz.toml/.release-plz.toml and uses them if they exist. If not, it parses the metadata from <project_dir>/Cargo.toml and uses that. Do you still want to check if they both exist and throw an error?

@MarcoIeni
Copy link
Owner

Do you still want to check if they both exist and throw an error?

That would be nice, yes!

@orhun
Copy link
Sponsor Contributor

orhun commented Dec 5, 2023

PR is updated!

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 help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants