Closed eXigentCoder closed 6 months ago
Hi @eXigentCoder,
My question is do the post-targets all run in parallel or in series? I took a look at the code and i'm not familiar with rxjs but I suspect it's in parallel?
By design post-targets run in series to avoid race-conditions.
I wanted to look at using the post-targets as https://github.com/bikecoders/ngx-deploy-npm/issues/70 to kick off my build-package-json target and then the publish target, but if they happen in parallel It might build the package before dependencies have been injected.
Yes, it's exactly why we introduced post-targets, they only run on versioned projects so I think it's what you need in your case.
I can't see a way to specify which configuration the post-target should use, but from looking at the code I think it will inherit whichever configuration the version target was using, is that correct?
You can pass a configuration to your post-target like this: "postTargets": ["my-proj:target:config"]
.
Hope it helps.
Awesome stuff, thanks so much and keep up the great work, appreciate it! ❤️
Hey there,
Firstly thanks so much, this library is awesome! My question is do the post-targets all run in parallel or in series? I took a look at the code and i'm not familiar with
rxjs
but I suspect it's in parallel?The reason I ask is that my
GitHub Action
for my NX monorepo workflow is as follows:affected
local npm packages using your library. Sometimes there is no need for a version bumpcommit
+tags
back to the origin (commit messages have[skip ci]
so doesn't fire off a newGitHub Action
).package.json
dependencies
for the local npm libraries so that they have the latest versions of cross dependencies in themaffected
local libraries to npm. ⬅️ This step is failing because it's trying to push a version that already exists as there is no change to some of the libs.I wanted to look at using the
post-targets
as described in this issue to kick off mybuild-package-json
target and then thepublish
target, but if they happen in parallel It might build the package before dependencies have been injected.Right now I have just added
continue-on-error: true
to mypublish
action, but it's not great since if it fails to publish for a legitimate reason the build will still succeed.Also, just to confirm, both my
version
andpublish
targets haveconfigurations
within them, I can't see a way to specify which configuration thepost-target
should use, but from looking at the code I think it will inherit whichever configuration theversion
target was using, is that correct?Would love some clarification/advice here, thanks!