Implement kicad-cli sym upgrade --force check
This check both the integrity of the files via $?
of kicad-cli sym upgrade --force and also checks if the file is changed.
See discussion on Zulip.
Example output, use with:
git clone -b test-ci-kicad-cli-upgrade https://gitlab.com/ulikoehler/kicad-symbols.git
$ ../kicad-library-utils/tools/gitlabci/check_symbols.sh
../kicad-library-utils/tools/gitlabci/common.sh: Zeile 15: [: ==: Einstelliger (unärer) Operator erwartet.
Python 3.10.12
fatal: Zielpfad '../kicad-footprints' existiert bereits und ist kein leeres Verzeichnis.
Comparing range d3d6676c7a1e7bdeff03de649814ddba53a984e7 to eca763922f53e6ebff160899c4f2ea78579c9411
Found new Libraries: Reference_Voltage.kicad_sym
Found old Libraries: Reference_Voltage.kicad_sym
Upgrading Reference_Voltage.kicad_sym
ERROR: 'kicad-cli sym upgrade --force' changes Reference_Voltage.kicad_sym .
Please re-save in KiCad or run 'kicad-cli sym upgrade --force Reference_Voltage.kicad_sym'
Fatal error: 1 libraries failed integrity check
Edited by Uli Köhler