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

Allow specifying multiple, independent packages. #153

Closed
Tracked by #98
dbanty opened this issue Mar 10, 2022 · 2 comments · Fixed by #257
Closed
Tracked by #98

Allow specifying multiple, independent packages. #153

dbanty opened this issue Mar 10, 2022 · 2 comments · Fixed by #257
Labels
🎸 Feature New feature or request

Comments

@dbanty
Copy link
Member

dbanty commented Mar 10, 2022

Change the way that single-package definition works so it looks like this:

[package]
versioned_files = [...]
changelog = ""

For multiple packages, it should look like this:

[[packages]]
versioned_files = [...]
changelog = ""
name = ""  # New required field when defining multiple

The name field will be usable in a few ways:

  1. When creating a GitHub release, name it " " to differentiate between releases (with notes) for different packages.
  2. The tag of the release should be <name>/v<version> to avoid version tag conflicts. This is the tagging scheme supported by Go modules—as long as name is the same as directory.
  3. Useful to include in logging to specify which packages are being updated, especially in dry-runs

The BumpVersion and Release steps will apply to all packages.

@dbanty dbanty changed the title Allow specifying multiple, independent packages. Bump versions for all of them, use their separate release prefixes in the release step and separate changelogs. Allow specifying multiple, independent packages. Mar 10, 2022
@dbanty dbanty added the 🎸 Feature New feature or request label Mar 10, 2022
@dbanty dbanty modified the milestones: 0.2.0, 0.3.0 Mar 26, 2022
@dbanty
Copy link
Member Author

dbanty commented Mar 26, 2022

For monorepo support to really work, this also has to go hunt and update co-dependent packages. So whenever a package is updated, Knope should go check every other registered file of the same type for dependencies that match the package name and update them. Lockfiles will probably also need updating—but lockfiles tend to have hashes which could get tricky to do without calling out to the package manager.

@dbanty dbanty removed this from the 0.3.0 milestone Jun 10, 2022
@dbanty dbanty added 🥚 breaking change This change will require existing users to change something about their config and removed 🥚 breaking change This change will require existing users to change something about their config labels Jun 10, 2022
@dbanty
Copy link
Member Author

dbanty commented Aug 27, 2022

Some design tweaks, which will avoid breaking changes for now:

  1. Change packages to be an object instead of an array when multiple packages are defined. The key is the name since it's required.
  2. Support the existing syntax with a deprecation warning. Add a knope --upgrade, which auto rewrites knope.toml to the new syntax.
  3. The Version variable in Command will simply not work if multiple packages are defined for now. If someone has a use case for this in the future—we'll add new syntax to support it.

@dbanty dbanty removed the 🥚 breaking change This change will require existing users to change something about their config label Aug 27, 2022
dbanty added a commit that referenced this issue Sep 5, 2022
…yntax. (#257)

Closes #153

Co-authored-by: Dylan Anthony <dbanty@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎸 Feature New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant