melos icon indicating copy to clipboard operation
melos copied to clipboard

fix: support configuration --server

Open maxfrees opened this issue 9 months ago • 8 comments

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.

maxfrees avatar Mar 10 '25 10:03 maxfrees

Isn't this configurable in the pubspec?

spydon avatar Mar 12 '25 05:03 spydon

publish_to ?

maxfrees avatar Mar 12 '25 05:03 maxfrees

publish_to ?

Yeah exactly, doesn't that work for you? Or does Melos have something hardcoded to the normal pub?

spydon avatar Mar 12 '25 05:03 spydon

publish_to: https://pub.dev

hint

Uploading... ERROR: Message from server: Invalid publish_to value: https://pub.dev.

maxfrees avatar Mar 12 '25 06:03 maxfrees

https://github.com/dart-lang/pub/issues/3431

maxfrees avatar Mar 12 '25 06:03 maxfrees

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?

maxfrees avatar Mar 12 '25 06:03 maxfrees

Image

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)?

maxfrees avatar Mar 12 '25 07:03 maxfrees

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.

spydon avatar Mar 12 '25 08:03 spydon