Move KiBot Preflights to their own folder
Some checks failed
KiBot CI / test (push) Failing after 33s

This commit is contained in:
2026-03-10 18:50:06 -07:00
parent eb9192b67d
commit 9e36c93eb6
7 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,97 @@
# KiBot preflight for setting Text Variables
# https://kibot.readthedocs.io/en/latest/configuration/preflights/set_text_variables.html
kibot:
version: 1
preflight:
update_xml: true
set_text_variables:
# Git-related information
- variable: 'REVISION'
text: '@REVISION@'
- variable: 'RELEASE_STATE'
text: '@RELEASE_STATE@'
- variable: 'RELEASE_DATE'
command: 'git log -1 --format="%ad" --date=short'
- variable: 'GIT_HASH_SCH'
command: 'git log -1 --format="%h" $KIBOT_SCH_NAME'
- variable: 'GIT_HASH_PCB'
command: 'git log -1 --format="%h" $KIBOT_PCB_NAME'
- variable: 'GIT_HASH'
command: 'git log -1 --format="%h"'
- variable: 'GIT_URL'
command: 'git remote get-url origin | sed -e s"/\\.git$//g"'
# Metadata
- variable: 'VARIANT'
text: '%V'
# Notes
- variable: 'SCHEMATIC_NOTES'
expand_in_command: true
command: '[ -f "@SCHEMATIC_DIR@/%f-schematic_notes%v.txt" ] && cat "@SCHEMATIC_DIR@/%f-schematic_notes%v.txt" || echo ""'
- variable: 'FABRICATION_NOTES'
expand_in_command: true
command: '[ -f "@FABRICATION_DIR@/%f-fabrication_notes%v.txt" ] && cat "@FABRICATION_DIR@/%f-fabrication_notes%v.txt" || echo ""'
- variable: 'ASSEMBLY_NOTES'
expand_in_command: true
command: '[ -f "@ASSEMBLY_DIR@/%f-assembly_notes%v.txt" ] && cat "@ASSEMBLY_DIR@/%f-assembly_notes%v.txt" || echo ""'
# Page titles for automatic ToC
- variable: '@SHEET_NAME_VAR@01'
text: 'Cover Page'
- variable: '@SHEET_NAME_VAR@02'
command: '@GET_SHEET_CMD@ 2'
- variable: '@SHEET_NAME_VAR@03'
command: '@GET_SHEET_CMD@ 3'
- variable: '@SHEET_NAME_VAR@04'
command: '@GET_SHEET_CMD@ 4'
- variable: '@SHEET_NAME_VAR@05'
command: '@GET_SHEET_CMD@ 5'
- variable: '@SHEET_NAME_VAR@06'
command: '@GET_SHEET_CMD@ 6'
- variable: '@SHEET_NAME_VAR@07'
command: '@GET_SHEET_CMD@ 7'
- variable: '@SHEET_NAME_VAR@08'
command: '@GET_SHEET_CMD@ 8'
- variable: '@SHEET_NAME_VAR@09'
command: '@GET_SHEET_CMD@ 9'
- variable: '@SHEET_NAME_VAR@10'
command: '@GET_SHEET_CMD@ 10'
- variable: '@SHEET_NAME_VAR@11'
command: '@GET_SHEET_CMD@ 11'
- variable: '@SHEET_NAME_VAR@12'
command: '@GET_SHEET_CMD@ 12'
- variable: '@SHEET_NAME_VAR@13'
command: '@GET_SHEET_CMD@ 13'
- variable: '@SHEET_NAME_VAR@14'
command: '@GET_SHEET_CMD@ 14'
- variable: '@SHEET_NAME_VAR@15'
command: '@GET_SHEET_CMD@ 15'
- variable: '@SHEET_NAME_VAR@16'
command: '@GET_SHEET_CMD@ 16'
- variable: '@SHEET_NAME_VAR@17'
command: '@GET_SHEET_CMD@ 17'
- variable: '@SHEET_NAME_VAR@18'
command: '@GET_SHEET_CMD@ 18'
- variable: '@SHEET_NAME_VAR@19'
command: '@GET_SHEET_CMD@ 19'
- variable: '@SHEET_NAME_VAR@20'
command: '@GET_SHEET_CMD@ 20'
...
definitions:
REVISION: ''
RELEASE_STATE: ''
RELEASE_DATE: ''
SHEET_NAME_VAR: SHEET_NAME_
SCRIPTS_DIR: kibot/scripts
FABRICATION_DIR: mfg/fab
ASSEMBLY_DIR: mfg/assembly
GET_SHEET_CMD: python3 @SCRIPTS_DIR@/get_sheet_title.py -f "${KIBOT_SCH_NAME%.kicad_sch}.xml" --dots-number 38 -p
GET_GITURL_CMD: git remote get-url origin | sed -e s'/\.git$//g'