release-it-plugins / workspaces

A release-it plugin for publishing projects with workspaces
MIT License
62 stars 14 forks source link

Can we release any single package? #36

Open ajainvivek opened 4 years ago

ajainvivek commented 4 years ago

Is there any option to release just one package rather than release all at once?

rwjblue commented 4 years ago

Do you mean something that would release only packages that are specifically changed since the last release? Or perhaps that you would want to explicitly request specific packages to be released?

I think we can add support for either (or both) of those things, I'd just like to flesh out what features we want to add.

ajainvivek commented 4 years ago

That is right. Only release changed packages from the previous release.

Also, would nice to have release any single package on demand.

In my current project we use yarn workspace in combination with lerna. We have custom script which only releases lerna changed packages.

rwjblue commented 4 years ago

Ya, I've seen similar configs before. I think that is something we can definitely do, but I think it would require that we figure out what changed. Do you happen to know how lerna figures that out? I could imagine a few different git commands that we could use :thinking:. Then we'd have a config setting (e.g. detectChangesCommand) so folks could override / customize.

xg-wang commented 3 years ago

how lerna figures that out?

Looks like basically git diff --name-only ...

cumt-robin commented 2 years ago

i have the same question. is there any solution?

scalvert commented 2 years ago

We don't currently have support for releasing a single package, as this plugin is design to release all workspace packages at once, synchronizing their version numbers. If you need to independently release packages, it's best to install release-it within each of those. It's more cumbersome, but it does work. I did this exact thing in https://github.com/microsoft/sarif-js-sdk.

buruofei commented 1 year ago

Can we release any single package?+1

buruofei commented 1 year ago

i have the same question. is there any solution?

scalvert commented 1 year ago

I think this was already answered above -> https://github.com/release-it-plugins/workspaces/issues/36#issuecomment-1191804049

buruofei commented 1 year ago

I think this was already answered above -> #36 (comment)

It's more cumbersome。in this reop,When I execute in the root directory wiht 「run npx release-it --no-git.push」,it just check changes the root package.json version

image
scalvert commented 1 year ago

I believe there's a missing step in the RELEASE.md. You need to cd into the respective package in order to release it. I'll ensure that's updated.

gossi commented 1 year ago

This is very unfortunate not to have. As this is widely used for classic v1 ember addons, this is a bummer to migrate/release v2 addons, that are usually using workspaces.

Yes, it sorta works to cd into that folder for that one package you want to release... but you have to do manual post-processing to keep the next release rolling (such updating version numbers in other packages, etc. so changelog generation will find the right one) - we have a release stalling for weeks now, due to this.

The expected behavior of workspaces to me is, that it releases all found packages, that are not private: true... regardless of how many those are?

scalvert commented 1 year ago

@gossi I've never built v1 addons that require workspaces. We always released as part of the usual release-it process with the lerna-changelog plugin only.

Which v1 addons use workspaces? Also, it's probably not a terrible idea to migrate to v2 anyway...

gossi commented 1 year ago

Sorry, what I meant is: The release-it combination with lerna-changelog is a welcome way to maintain a v1 addon.. BUT going into the v2 world, this is becoming ugly with release-it workspaces not capable handling workspace with only one public package in there. It contradicts the expectation of installing this your repo-root and release the one public package, while keeping all the necessary version numbers for the next changelog updated (at the moment, you have to manually update the version in the root package, as this is what's been read to make the diff for the changelog).

I'd very much see the release-it combo a nice tool to manage releases with no effort for v2 addons.