In my previous post https://lnkd.in/eJbfM6xR I discussed how important it is to synchronize all the data in a project. I also mentioned that doing it manually is a pain in the ass and basically never works.
In this post, I want to show an example of how this problem should be solved—and its elegance.
Our task is to write tutorials and guides for the documentation, but in such a way that they are always tied to a specific version of the code and are always executable.
To solve this problem, we present the guides as test cases, which are executed along with all others during the build process. Based on their results, an MD-format file with the article is generated. And if something doesn't work, we immediately fix it and accordingly update the test/guide.
As you can see from the code, even a junior developer could write the tool that does this, or you can simply ask ChatGPT.
This approach will save you from pain, problems, and thousands of bug reports about something not working.