Push only tags (not commits) during nx release
(avoid git error)?
#32751
Unanswered
jhpedemonte
asked this question in
Questions
Replies: 1 comment
-
The code specifically So one possible solution would be to set
This would disable follow-tags (so it wouldn't try to push up any commits) and then push up any tags. But I'm concerned about this approach due to this comment in the code:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to only push tags (no commits) during
nx release
?Our CI flow calls
nx release
on themain
branch only after build and tests have passed, which can take some time. Then,nx release
will create tags (e.g.git tag --annotate pkg@1.2.3 --message pkg@1.2.3
), followed by pushing to remote repo (git push --follow-tags --no-verify --atomic
).The problem happens if someone else merges into the branch after the CI process has pulled the branch but before calling
nx release
. Thegit push ...
fails because the local branch is now out of date with the remote branch:But I just want to push up the tags only. I have
release.git.commit
set tofalse
. Is there some way to do this and avoid the error above?Beta Was this translation helpful? Give feedback.
All reactions