Open jaasum-msft opened 6 months ago
I can't use rush version --bump before rush build and rush publish because it requires nextBump to be explicitly stated in the version policy and bypasses the definitions in the change files.
rush version
doesn't care whether the repo has been built or not, so it should apply your changefiles regardless. Are you generating changefiles during your build?
I can't use rush version --bump before rush build and rush publish because it requires nextBump to be explicitly stated in the version policy and bypasses the definitions in the change files.
rush version
doesn't care whether the repo has been built or not, so it should apply your changefiles regardless. Are you generating changefiles during your build?
rush version
is processing the changefiles and they are generated prior. If I have two changefiles where one is marked patch
and the other marked minor
I'd expect rush version --bump
to generate the changelog and bump the version numbers for all my project's package.json
to a minor
release. However, it will error and say Invalid version number vX.X.X in project-name
unless I explicitly write nextBump
as stated above, which overrides anything found in the changefiles.
I've tried to use rush publish --apply
as another way to "bump" the version number and generate the changelog before publishing, but it will error as there is no package.json
found in the publishFolder
argument.
Tricky to explain, but basically I have no valid option within Rush and my current setup to:
The only way I've managed to get it to work is with two explicit build steps. I'd assume if rush publish
also looked at the package.json
in the publishFolder
and bumped it before publishing it would work as expected. Not sure why it doesn't.
Summary
I'm aiming to include an Angular library in my monorepo which consumes an output from another project; StencilJS using the Angular framework integration.
My directory structure:
project-angular
(not published, but builds the finalangular-component-library
package)angular-component-library
(published, fromdist
directory output byproject-angular
'sbuild
script)project-stencil
(main source, outputs artifacts intoangular-component-library
via itsbuild
script)The
angular-component-library
andproject-stencil
are in a lockstep version policy:My rush projects in
rush.json
:The action I'm performing where I run into trouble is that
rush publish
doesn't work as expected and I believe thepublishFolder
argument is the culprit. I would assume that my CI/CD pipeline would:angular-component-library
in it'sdist
directory viaproject-angular
)What went wrong is when running
rush build
beforerush publish
thepackage.json
in thepublishFolder
version is not bumped, which leads to an attempt to publish the previous version.Ultimately, my CI/CD pipeline looks like this:
What I'd expect to work is:
I can't use
rush version --bump
beforerush build
andrush publish
because it requiresnextBump
to be explicitly stated in the version policy and bypasses the definitions in the change files. WithoutnextBump
in my version policy Rush will produce aninvalid version
error. If I attempt to userush publish --apply
before building Rush will fail (cannot find package-name
), because the package is not found in the yet-to-be-compiledpublishFolder
.Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?pnpm-config.json
node -v
)?