ttyplot icon indicating copy to clipboard operation
ttyplot copied to clipboard

Store the version string in a single place

Open edgar-bonet opened this issue 1 year ago • 3 comments

As shown by the recent version bumps (1.6.4 and 1.6.5), incrementing the version number is error prone. This is because this version number is stored in two different files (ttyplot.c and recordings/expected.txt), and these have to be kept manually in sync.

This pull request creates a single source of truth for the version string, which is the Makefile. The file expected.txt has been replaced by a template containing the string @VERSION@, which the CI workflow replaces by the actual version string. The script get_back_in_sync.sh does the reverse replacement.

edgar-bonet avatar May 13 '24 08:05 edgar-bonet

I wrote:

As shown by the recent version bumps (1.6.4 and 1.6.5), incrementing the version number is error prone.

It appears this happened again on the last few version bumps. Whereas I agree with @hartwork that, in an ideal world, this should not be an issue, in practice it is annoying.

Also, as the project owner, @tenox7 can choose tu push directly, without going through a pull request. We are not in a position to question this choice. It even appears that @tenox7 found that a good way to get rid of this annoyance was to simply remove UI tests step from Linux/macOS workflow.

As I believe these UI tests have some value, I have rebased this pull request on top of the current master branch, with an extra commit that reverts a079775c8a027223e7954c96b628aecd795bc7e9.

edgar-bonet avatar Apr 06 '25 13:04 edgar-bonet

I like this. Approved, if you can resolve merge conflict. Also feel free to restore the version check with this.

tenox7 avatar Apr 07 '25 23:04 tenox7

I just rebased the branch on top of master and force-pushed.

edgar-bonet avatar Apr 08 '25 07:04 edgar-bonet