Resolve "CI job to detect that dhcpdb_create scripts and upgrade scripts are in sync"
Closes #2205 (closed).
Multiple ways to run the script. When run without parameters, the logic is:
- Look at all the changed files in src/share/database/scripts.
- If it is a dhcpdb_create script.
- Then compare it with the latest upgrade script, but only the common sections.
- If it is an upgrade script.
- Then compare it with dhcpdb_create, but only the common sections.
The common sections are decided based on the python difflib's library.
Please ask me to regenerate the CI image before you review. It needs python3 installed as you may have noticed in the CI results.
- line numbers cannot be easily shown because of how python difflib works
- you might be tempted to test by adding something to the end of a
dhcpdb_createscript. This will not work because that is outside of the common sections. Add to a common section instead.