fix: very_good seems hard to use with GHA
eseidel opened this issue · comments
You have to first install it:
pub global activate very_good_cli
But you can't run it with pub global run
:
pub global run very_good
:
https://github.com/eseidel/space_gen/actions/runs/6076392266/job/16484311029
So you have to do:
pub global run very_good_cli
:
https://github.com/eseidel/space_gen/actions/runs/6076402720/job/16484341481
Could not find bin/very_good_cli.dart in package very_good_cli.
but even if you ignore that (since GHA does put the pub cache in your path), you still hit an analytics prompt you can't get past:
https://github.com/eseidel/space_gen/actions/runs/6076410782/job/16484363449
+---------------------------------------------------+
| Welcome to the Very Good CLI! |
+---------------------------------------------------+
| We would like to collect anonymous |
| usage statistics in order to improve the tool. |
| Would you like to opt-into help us improve? [y/n] |
+---------------------------------------------------+
+---------------------------------------------------+
| Welcome to the Very Good CLI! |
+---------------------------------------------------+
| We would like to collect anonymous |
| usage statistics in order to improve the tool. |
| Would you like to opt-into help us improve? [y/n] |
+---------------------------------------------------+
If you pass --analytics false (to try and get past the prompt) then it just exits, ignoring the rest of your command 🤣
very_good --analytics false packages get -r
analytics disabled.
Just a series of small bugs.
I was expeting to see a 'setup very_good" as part of:
https://github.com/VeryGoodOpenSource/very_good_workflows
But didn't see one.
In the end, I gave up. I'll just use pub get
directly:
https://github.com/eseidel/space_gen/actions/runs/6076496760/job/16484607448
You can checkout very_good_workflows/flutter_package for an example of how to use very_good_cli in gha
This can be improved by detecting if running on CI and disabling prompts 👍
But you can't run it with pub global run
You can, but there's a trick. pub global run very_good
won't work because the package name (very_good_cli
) differs from the executable command (very_good
). In such cases you have to specify the command name separated by :
. As in:
pub global run very_good_cli:very_good
.
The analytics bug should be fixed in the next release.
This can be improved by detecting if running on CI and disabling prompts 👍
@felangel
Agreed, even though we only have that analytics prompt now (which will be removed in the next version), we may have more in the future based on mason_logger wizard-ish prompts. Any possibility too having that detection integrated into its API?
This can be improved by detecting if running on CI and disabling prompts 👍
@felangelAgreed, even though we only have that analytics prompt now (which will be removed in the next version), we may have more in the future based on mason_logger wizard-ish prompts. Any possibility too having that detection integrated into its API?
Yup planning to get that done when I’m back from Flutter & Friends.
The analytics prompt was removed in the latest version and there is no more prompts left.
I think this can be closed for now, right @eseidel ?
No objections.