Skip to content

Commit 990876e

Browse files
committed
[CLI][Fixed] Use of --variant and a TARGET
- The taget was created only for the first variant
1 parent 0d0565c commit 990876e

5 files changed

Lines changed: 19 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2626
- `remove_split_pdfs`: To control if we remove split PDFs
2727

2828
## Fixed
29+
- CLI:
30+
- When using a --variant and an specific target, it was generated for the
31+
first variant in the list, not the rest
2932
- KiRi:
3033
- `kiri_server` path to the HTML
3134
- *SCH Print:

docs/source/Changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ Added
5151
Fixed
5252
-----
5353

54+
- CLI:
55+
56+
- When using a –variant and an specific target, it was generated for
57+
the first variant in the list, not the rest
58+
5459
- KiRi:
5560

5661
- ``kiri_server`` path to the HTML

kibot/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,8 @@ def main():
690690
old_tree = o._tree
691691
o.__init__()
692692
o.set_tree(old_tree)
693+
o.name = old_tree.get('name')
694+
o.type = old_tree.get('type')
693695
# Preflights aren't "variantic", so skip all of them for the rest of variants
694696
args.skip_pre = 'all'
695697
generate_outputs(args.target, args.invert_sel, args.skip_pre, args.cli_order, args.no_priority,

tests/test_plot/test_print_pcb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def test_print_pcb_variant_var_ki10(test_dir):
256256
This test uses KiCad 10 native variants and the internal print mechanism """
257257
prj = 'variant_var'
258258
ctx = context.TestContext(test_dir, prj, 'variant_var_ki10', 'PNG')
259-
ctx.run(extra=['--variant', 'production', '--variant', 'development', '--variant', 'NONE'])
259+
ctx.run(extra=['--variant', 'production', '--variant', 'development', '--variant', 'NONE', 'PNG'])
260260
ctx.compare_image(prj+'-assembly_page_01_production.png', tol=DIFF_TOL, sub=True)
261261
ctx.compare_image(prj+'-assembly_page_01_development.png', tol=DIFF_TOL, sub=True)
262262
ctx.compare_image(prj+'-assembly_page_01.png', tol=DIFF_TOL, sub=True)

tests/yaml_samples/variant_var_ki10.kibot.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,11 @@ outputs:
1616
- layers:
1717
- layer: F.Cu
1818
- layer: F.SilkS
19+
20+
- name: 'svg_layers'
21+
comment: "SVGs for layers"
22+
type: svg
23+
layers: ['F.Cu', 'F.SilkS']
24+
options:
25+
scaling: 0
26+
# plot_sheet_reference: true

0 commit comments

Comments
 (0)