Commit Graph

3 Commits

Author SHA1 Message Date
Rafael Kitover ba9c10d566
cmake: Make FileIterator more correct, add eg..
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>
2020-01-26 23:35:09 +00:00
Rafael Kitover 5de47935cf
cmake: Followup on release commit automation.
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>
2020-01-22 18:15:21 +00:00
Rafael Kitover 93f906e2db
cmake: Automate release commit and tag.
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>
2020-01-22 03:14:26 +00:00