Skip to content

fix: support configuration --server #875

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

Open
1 of 2 tasks
maxfrees opened this issue Mar 10, 2025 · 8 comments
Open
1 of 2 tasks

fix: support configuration --server #875

maxfrees opened this issue Mar 10, 2025 · 8 comments
Labels
bug Something isn't working

Comments

@maxfrees
Copy link

Is there an existing issue for this?

  • 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 maxfrees added the bug Something isn't working label Mar 10, 2025
@spydon
Copy link
Collaborator

spydon commented Mar 12, 2025

Isn't this configurable in the pubspec?

@maxfrees
Copy link
Author

publish_to ?

@spydon
Copy link
Collaborator

spydon commented Mar 12, 2025

publish_to ?

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

@maxfrees
Copy link
Author

publish_to: https://pub.dev

hint

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

@maxfrees
Copy link
Author

dart-lang/pub#3431

@maxfrees
Copy link
Author

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
Copy link
Author

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

@spydon
Copy link
Collaborator

spydon commented Mar 12, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants