fix: support configuration --server
Is there an existing issue for this?
- [x] I have searched the existing issues.
Version
lastest
Description
support configuration --server
dart pub token add https://pub.flutter-io.cn
My pub points to https://pub.flutter-io.cn, but I need pushlish to https://pub.dartlang.org
Can you add more options, like dart publish --r=https://pub.dartlang.org
Steps to reproduce
Expected behavior
Screenshots
No response
Additional context and comments
No response
Other
- [ ] I'm interested in working on a PR for this.
Isn't this configurable in the pubspec?
publish_to ?
publish_to ?
Yeah exactly, doesn't that work for you? Or does Melos have something hardcoded to the normal pub?
publish_to: https://pub.dev
hint
Uploading...
ERROR: Message from server: Invalid publish_to value: https://pub.dev.
https://github.com/dart-lang/pub/issues/3431
Can't go through the configuration file, can only go through dart pub publish - server=https://pub.dev, but I don't want to manually execute the command for each package, is there any way to solve it?
I tried melos run publish this way, but it kept getting stuck. Do you want to publish 1.1.3 to https://pub.dev (y/N)?
Can't go through the configuration file, can only go through dart pub publish - server=https://pub.dev, but I don't want to manually execute the command for each package, is there any way to solve it?
You can create a Melos script for it with exec that does it, but I agree we should get a parameter for this in the long run.