[#31] Use mkDGitRevision only in executables
Description
Problem: in the current state contract code (AbstractLedger and
ManagedLedger) calls mkDGitRevision
in the library component. There
are two problems with that:
- New commits and rebuilds of
morley-ledgers
executable potentially wont trigger git revision update in the contracts. - There is nowhere to get git revision from when
morley-ledgers
is used as a library.
Solution: introduce a new documentation section DGeneralInfoSection,
which wraps git revision and potentially other things like contract
author, and insert this section in the contract code.
Then make a wrapper buildInstrDocWithGitRev
which finds
DGeneralInfoSection and patches it with git revision provided by the
caller. It is expected to be called only from the executable.
Related issue(s)
Resolves #31 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.