From af2aad165958f8146d3dbcfb31a0208512609020 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 2 Jan 2024 13:33:55 -0300 Subject: [PATCH] [Added] Autodetection of .kibot.yml files - So people using CI/CD can name all YAML files `.yml` (DOS legacy?) --- CHANGELOG.md | 1 + docs/GITHUB-ACTIONS-README.md | 2 +- kibot/__main__.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 361dd2ec..e16afe42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - General: - Operations that copies the project now also copies the PRL and the DRU + - Files named *.kibot.yml are also detected as configuration files - Command line: - `--help-list-offsets` to list footprint offsets (JLCPCB) - `--help-list-rotations` to list footprint rotations (JLCPCB) diff --git a/docs/GITHUB-ACTIONS-README.md b/docs/GITHUB-ACTIONS-README.md index c59d66af..995d6362 100644 --- a/docs/GITHUB-ACTIONS-README.md +++ b/docs/GITHUB-ACTIONS-README.md @@ -67,7 +67,7 @@ The `uses: actions/checkout` refers to a specific repo, [GitHub Actions](https:/ ## Caveats, Gotchyas, and Pitfalls -1. KiBot requires a `{meaningful_name}.kibot.yaml` file name scheme. While most places use `*.yml` and `*.yaml` interchangeably, it is specific here that `*.kibot.yml` won't work. This is especially odd since GitHub uses `*.yml` and kibot uses `*.yaml`. +1. KiBot requires a `{meaningful_name}.kibot.yaml` file name scheme. You can also use `{meaningful_name}.kibot.yml`. ## Different ways of doing things diff --git a/kibot/__main__.py b/kibot/__main__.py index f439674f..721846e3 100644 --- a/kibot/__main__.py +++ b/kibot/__main__.py @@ -215,7 +215,7 @@ def list_variants(logger, only_names): def solve_config(a_plot_config, quiet=False): plot_config = a_plot_config if not plot_config: - plot_configs = glob('*.kibot.yaml')+glob('*.kiplot.yaml')+glob('*.kibot.yaml.gz') + plot_configs = glob('*.kibot.yaml')+glob('*.kiplot.yaml')+glob('*.kibot.yaml.gz')+glob('*.kibot.yml') if len(plot_configs) == 1: plot_config = plot_configs[0] if not quiet: