Skip to content
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

Make dart pub global run firehose --validate work with Flutter projects to support autopublishing #154

Closed
dcharkes opened this issue Aug 30, 2023 · 2 comments · Fixed by #155
Assignees
Labels
needs-info Additional information needed from the issue author package:firehose

Comments

@dcharkes
Copy link

This expects the pubspec.yaml to use the Dart SDK:

var code = await runCommand('dart',
args: ['pub', 'publish', '--dry-run'], cwd: package.directory);

We should consider checking the pubspec.yaml contents to see if a Flutter SDK is required.
Or, just try the dart command and if it fails with an error message that it requires the Flutter SDK, do the flutter command.

Context:

@HosseinYousefi You could consider submitting a PR here.

@mosuem What is the preferred solution here?

@mosuem
Copy link
Member

mosuem commented Aug 30, 2023

As I have never published a Flutter package before: You basically want to run flutter pub publish and flutter pub get instead of dart pub publish and dart pub get?

@mosuem mosuem added the needs-info Additional information needed from the issue author label Aug 30, 2023
@mosuem mosuem self-assigned this Aug 30, 2023
@dcharkes
Copy link
Author

As I have never published a Flutter package before: You basically want to run flutter pub publish and flutter pub get instead of dart pub publish and dart pub get?

Correct 👌

The pubspec.yaml contains something along the lines of:

environment:
  sdk: '>=3.1.0-262.3.beta <4.0.0'
  flutter: '>=2.11.0'

@mosuem mosuem mentioned this issue Aug 30, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-info Additional information needed from the issue author package:firehose
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants