-
Notifications
You must be signed in to change notification settings - Fork 613
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
[rush] publish -a has confusing documentation #900
Comments
All the docs are open source. Feel free to propose a correction. There's even an "Improve this page" button to help you create a PR. :-)
Yes. This feature's design is fairly disorganized, because it was built over a couple years, and we kept discovering new requirements as it came together. Lately publishing is the area of Rush that consistently gets the most questions and confusion. But in order to really make it better, we will need to make some breaking changes, which is why serious efforts have been procrastinated. Fortunately our team is now finishing up some commitments from this summer, so we may finally have time to address this in Rush 6. I just opened #904 to track the status.
What do you mean by the "versioning prompt"? |
@pgonzal Thanks for the reply. Sorry I did a bit of a drive-by "what's going on?" dump. Making things more clear in rush 6 sounds awesome, but it'd be fantastic to have just some additional documentation in 5 before the improvements are rolled out. Even just a rundown of "here's what the flow looks like if you want to auto-publish from CI every time code is merged into master" would be super helpful. In trying to get this working I'm running into questions like:
By the versioning prompt I meant running publish was prompting me to enter version numbers before publishing to NPM. I would expect only Thanks! |
@octogonz Were there any changes since 2018 on this front? Is there any chance you could answer the above questions? |
Sure!
In a simple setup, publishing is run against the For advanced releases, you can also create a "release branch" (not "feature branch" technically). In that case, publishing is typically manually performed when you're ready to do a release. And often in that scenario, you use a version policy which allows you to manually configure what kind of version bump you want, rather than relying on the
The best practice is that a CI job should always perform publishing. Individual employees normally do not have access to the credentials for publishing packages; instead they would run a CI job which publishes a branch on their behalf. This way every package that gets published has an audit trail -- who published it? who approved it? what branch was used? how was it built? Rush is designed around this assumption, but of course it's also possible to invoke the commands manually, for example for testing.
In the recommended version,
As far as HOW you make Rush do things, currently our answer is basically to copy the recipe from azure-pipelines/templates/publish.yaml. The CLI options are a bit confusing. The plan is to improve that by moving most of these options into config files in a future version of Rush. I've been involved with that project and am interested in feedback/requirements/ideas that people might want to share. |
Hello there,
Just started trying to use rush and immediately ran into some weirdness with
publish -a
on the first attempt to use it.I ran
rush change
, all the logs were generated properly, but then upon trying to dry run publish, it actually goes and deletes the change files. Note that no previous changelogs or anything else existed before I ranrush change
.Here's some output. The deletes actually happened, which I would expect would not happen in a dry run. There's quite a bit more output afterwards but it all seems fine. Running
publish -a
again, which I would expect to be idempotent, now does nothing.EDIT: I'm realizing this is probably really a documentation problem. The -h output makes it clear
-a
really isn't dry run, but this page sure makes it seem that way: https://rushjs.io/pages/maintainer/publishing/The publish
-h
output also mentions a--commit
flag which isn't a valid flag. In general I think therush change
->rush publish
flow isn't very well explained by the docs.How, for example, would I set up my CI to auto-publish packages? How can I skip the versioning prompt?
The text was updated successfully, but these errors were encountered: