-
Hi, for my firmware development I use a standard semver approach where the CI workflow automatically increments the version. (eg https://github.com/Strooom/MuMo-v2-Node-SW) Now I would like to do a similar thing for my HW/KiCad designs where (depending on the commit message/title) the workflow increments the version and then puts this new version into the design. So this means I would like to update the version fields in the KiCAD project files from KiBOT. Would that be possible somehow, or do I need an external script manipulate the KiCAD files for that ? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
You can use the https://kibot.readthedocs.io/en/master/configuration/preflights/set_text_variables.html I usually define the variable in KiCad with a value like WIP, then you can distinguish easily something generated from KiCad manually from something generated by a workflow. The deprecated preflights contains some ideas about what to use as command. |
Beta Was this translation helpful? Give feedback.
-
Ok, I was able to get a bit further but am still stuck on some syntax problems:
and in KiCAD I can then use ${majorVersion} and ${minorVersion} to put the version on the silkscreen.. But the substitution in "@majorVersionDigit@" is not working, ie. the variable is getting the value "@majorVersionDigit@" instead of "0". Any hints on how to get this working ? |
Beta Was this translation helpful? Give feedback.
You can use the
set_text_variables
preflight.https://kibot.readthedocs.io/en/master/configuration/preflights/set_text_variables.html
I usually define the variable in KiCad with a value like WIP, then you can distinguish easily something generated from KiCad manually from something generated by a workflow.
The deprecated preflights contains some ideas about what to use as command.
https://kibot.readthedocs.io/en/master/configuration/preflights/PCB_ReplaceOptions.html#pcb-replaceoptions