Add macro fi_check_done() to set fi_done if leftover contents is empty,
use it in both fi_open_file() and fi_get_next_line().
This fixes the behavior when the opened file is empty and makes the code
cleaner.
Add a usage example to top comment.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This is a followup on 93f906e2.
Simplify the FileIterator interface by doing the eof check in
fi_get_next_line().
Add rollback instructions to final instructions message.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a TAG_RELEASE cmake variable which engages a cmake script to
generate a signed release commit with changelog entries from git and
signed tag.
The value can be ON/TRUE/1 or a specific next version number, or UNDO to
rollback changes just made with this script.
The script tries to make sure all the preliminaries are in the right
state to do a release, the source is a git clone, on branch master, with
a clean working tree and gpg is available.
Also add a utility script FileIterator.cmake which is an OO-like line
iterator interface for text files, used by the release commit script.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>