From 8bed2595ffbee2cc559408faf3ddccbe0327145c Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Sat, 23 Apr 2022 14:44:00 -0300 Subject: [PATCH] Added small naive test to check if iBoM can get text variables Related to #161 --- tests/board_samples/kicad_6/light_control.kicad_pcb | 2 +- tests/yaml_samples/ibom_no_ops.kibot.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/board_samples/kicad_6/light_control.kicad_pcb b/tests/board_samples/kicad_6/light_control.kicad_pcb index e3dac948..02ecf80d 100644 --- a/tests/board_samples/kicad_6/light_control.kicad_pcb +++ b/tests/board_samples/kicad_6/light_control.kicad_pcb @@ -3748,7 +3748,7 @@ (gr_text "Rev 2" (at 134.62 76.2) (layer "B.SilkS") (tstamp 0ab1512b-eb91-4574-b11f-326e0ff10082) (effects (font (size 1 1) (thickness 0.15) italic) (justify mirror)) ) - (gr_text "WiredHut\nLight Control / Temperature Humidity Sensor" (at 134.62 73.66) (layer "B.SilkS") (tstamp 9a458d6a-a84c-4faf-913e-90bab231d3f8) + (gr_text "WiredHut ${gh}\nLight Control / Temperature Humidity Sensor" (at 134.62 73.66) (layer "B.SilkS") (tstamp 9a458d6a-a84c-4faf-913e-90bab231d3f8) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (gr_text "12V Gnd" (at 103.5 83.2 270) (layer "F.SilkS") (tstamp 00000000-0000-0000-0000-00005da425a7) diff --git a/tests/yaml_samples/ibom_no_ops.kibot.yaml b/tests/yaml_samples/ibom_no_ops.kibot.yaml index ab239474..b8de58d4 100644 --- a/tests/yaml_samples/ibom_no_ops.kibot.yaml +++ b/tests/yaml_samples/ibom_no_ops.kibot.yaml @@ -2,6 +2,12 @@ kibot: version: 1 +preflight: + set_text_variables: + - name: 'gh' + command: 'git log -1 --format="%h" $KIBOT_PCB_NAME' + before: 'Git:' + outputs: - name: 'interactive_bom' comment: "Interactive Bill of Materials (HTML)"