Overview of changes:
* Fixed caching and versioning logic
The logic used to get essential versioning info and retain it for
git-less installs was due to rewriting; it's been simplified and
cleaned up.
* Cleaned up formatting of SPEC file template from stub
* Codebase maintenance
Essential fact.sh functions git_lasthash() and semver() have been updated
so that they explicitly depend on git or fail, ie. forget about the cache.
Previously git_lasthash() would try to use cache or fail, while semver()
would try to use cache or rely on mkit.ini, which in turn had to be hacked
by dist() in order to make git-less targets expand version correctly
(with build data, eg. `0.1.2+ge1f4a77.dirty`).
The old code was guilty of four sins: inconsistency (git_lasthash()
vs. semver()), side effects (semver() would actually write cache),
hidden dependencies (both actually relied on functions from mkit.sh)
and unnecessary complexity (speculative $version use in semver()).
New code remediates all of these by making both functions just do their
job (ie. get data from VCS). Places that did benefit from the silent
caching are served by __cached() function created for this purpose.
Fields are separated according to relation: first paragraph has fields
referring to *project* and *source code* (we're not distinguishing among
these two); fields in the second on refer to *package*.
Summary, VcsBrowser, License, Source0, BuildArch... all clearly refer to
source code--much more than the resulting package.
Overview of changes:
* stub will generate 'install' (not 'PACKAGE'.install) list file
The other format is necessary for multi-packages.
* Removed override_dh_usrlocal from generated debian/rules
* Removed extra newline from generated README.md
* Added URL to generated specfile template
* Reformatted whitespace in generated specfile template
* Fixed typo in MKIT_STUB_README.md
Overview of changes:
* Fixed issue that would break release
Releases with many commits or many changed files can produce 'Bump
version' message so long that it would trigger OS command line limit.
This risk has been mitigated by ensuring the message is read from
file instead of git argument.
* Added "SRC" mode to preserve file modes from repository
Sometimes the mode scheme is not easy, so having mode to apply to
whole group is not plausible. Setting group mode to a special value
`SRC` will cause MKit replicate the mode from source (repo or
tarball).
* `stub new` will produce "nice" mkit.ini right away
Previously, re-formatting of mkit.ini would work only in update
mode; now it's nicely re-formatted on creation.
* Fixed formatting of INI files
If value in INI file contained space, formatting would break it up.
This is no longer the case.
* Cleaned up specfile template stub
New specfile template now does not contain tabs, has fields grouped
in more logical way, and omits BuildRequires, which was not all that
correct anyway.
* Improved README.md
If sources are built using `dist`, `rpmstuff` or `debstuff`, current
version of MKit does not actually require git--all that is necessary
should be cached in the tarball anyway.
Regarding coreutils, they are part of essential set on most
distributions; on those, one should actually refrain from specifying
them.
Overview of changes:
* Added data-sampler pseudo-target
To help developers see what tokens are available, this pseudo-target
just prints list of tokens and their values, for built-in tokens as
well as for user-defined.
* Removed obsolete build_manpages target and 'markdown' type
These were not compatible with current design od MKit and will
be better off re-implemented as plugins.
* Items in changelog template are now delimited by empty line
Just for convenience when formatting and extending.
* ini() can now list all sections from mkit.ini ('ini lssect')
* Refactored internal functions with double underscore
* Updated own meta-data
* Fixed small typos in comments and docstrings
* Quoted $MKIT_DIR properly in mkit.mk
* Updated own dogfood
Remove obsolete build_manpages target and markdown type
They're based on obsolete mkit.ini structure and is not used in any known
project. That said, at least build_manpages will be added in future,
most probably in form of plugin, once plugin structure is figured out.
(Stay tuned, but don't hold your breath!)
The changelog is intended to be edited, but it's more convenient this
way (especially if you're like me, using Vim and '{' and '}' as major
means of moving around.
Overview of changes:
* build target will now leave file .mkit/semver file
Build tools can read this to easily find out version.
* semver() caches its output now
* Refactored common operations in .mkit
* Removed old unnecessary check
* Solved or muted last few ShellCheck issues