Closed ernilambar closed 1 month ago
FYI we have an automated workflow that does this regularly. It can also be triggered manually, see https://github.com/wp-cli/entity-command/actions/workflows/regenerate-readme.yml
Then you can trigger it manually and even approve it yourself.
@swissspidy Does that action run in cron or something? It seems only testing.yml
is set to run in cron. https://github.com/wp-cli/.github/blob/main/.github/workflows/testing.yml
I re-ran the workflow in this repo but it is not detecting the changes. https://github.com/wp-cli/entity-command/actions/runs/9076624244/job/24939743450
Ah, it's triggered when pushing to the main
branch, that's what it is.
It was triggered for the merge of that new command as well: https://github.com/wp-cli/entity-command/actions/runs/8949960535/job/24584816614
But you're right, it's not working anymore 🤔
Maybe it's the echo "CHANGES_DETECTED=$([[ -z $(git status --porcelain) ]] && echo "0" || echo "1")" >> $GITHUB_ENV
part that's at fault?
OK but it is working for https://github.com/wp-cli/admin-command/pull/44? 🤔 Strange!
It did not work for find
also but it looks like dependency issue. https://github.com/wp-cli/find-command/actions/runs/9076553729/job/24939505278
I am also looking into it. Seems like WP-CLI is not working as expected in find command package.
The dependency issue should have been addressed by https://github.com/wp-cli/scaffold-package-command/pull/243
@swissspidy Seems like the issue is with the nightly phar file. I run the following commands in the root of wp-cli/find-command
package.
Initially, I donwloaded both the nightly and distributed versions of the wp-cli
phars. Then, I proceeded to extract them into directories and executed the command. Interestingly, I encountered an error only with wp-cli-nightly.phar
. Should we initiate the creation of a new nightly phar? or should we wait the arrival of the next one?
From what I can see the nightly phar is as up-to-date as it can be.
The workflow doesn't use the phar though, does it?
Just looked at https://github.com/wp-cli/i18n-command/actions/runs/9077866771/job/24943664516 and the issue is that it installs wp-cli/wp-cli 2.10 instead of 2.11 aka dev-main.
So we'd need to bump the dependency in i18n-command.
Before that, it installed the nightly phar whose version is WP-CLI 2.11.0-alpha-1b3a27a
.
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar
sudo mv wp-cli-nightly.phar /usr/local/bin/wp
sudo chmod +x /usr/local/bin/wp
Your assumption can also be true as I am not sure which wp-cli binary is included when executing the phar.
PHP Fatal error: Uncaught Error: Call to undefined method WP_CLI\Dispatcher\RootCommand::get_hook() in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/commands/src/CLI_Command.php:42
Stack trace:
#0 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/commands/src/CLI_Command.php(555): CLI_Command->command_to_array()
wp-cli/language-command#1 [internal function]: CLI_Command->cmd_dump()
wp-cli/language-command#2 /home/runner/work/i18n-command/i18n-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func()
wp-cli/language-command#3 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}()
wp-cli/language-command#4 /home/runner/work/i18n-command/i18n-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(497): call_user_func()
wp-cli/language-command#5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(441): WP_CLI\Dispatcher\Subcommand->invoke()
wp-cli/language-command#6 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php(1394): WP_CLI\Runner->run_command()
wp-cli/language-command#7 /home/runner/.wp-cli/packages/vendor/wp-cli/scaffold-package-command/src/ScaffoldPackageCommand.php(30 in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/commands/src/CLI_Command.php on line 42
So it is loading some classes from the Phar (which is the nightly and thus has 2.11), but then RootCommand
is coming from i18n-command/vendor/wp-cli
which is using 2.10.
Discussion continues in https://github.com/wp-cli/wp-cli/issues/5968
Update readme