mik-laj commented on code in PR #24216:
URL: https://github.com/apache/airflow/pull/24216#discussion_r890727244
##########
dev/breeze/src/airflow_breeze/commands/configuration_and_maintenance_commands.py:
##########
@@ -533,3 +534,27 @@ def remove_autogenerated_code(script_path: str):
def backup(script_path_file: Path):
shutil.copy(str(script_path_file), str(script_path_file) + ".bak")
+
+
[email protected](name="regenerate-command-images", help="Regenerate breeze
command images.")
+@option_verbose
+@option_dry_run
+def regenerate_command_images(verbose: bool, dry_run: bool):
+ assert_pre_commit_installed(verbose=verbose)
+ perform_environment_checks(verbose=verbose)
+ try:
+ (AIRFLOW_SOURCES_ROOT / "images" / "breeze" /
"output-commands-hash.txt").unlink()
+ except FileNotFoundError:
+ # when we go to Python 3.8+ we can add missing_ok = True instead of
try/except
+ pass
+ command_to_execute = [sys.executable, "-m", "pre_commit", 'run',
'update-breeze-file', '--all-files']
Review Comment:
Does it work with any installation method like homebrew, pipx, conda?
```
brew install pre-commit
conda install -c conda-forge pre-commit
pipx install pre-commit
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]