all repos — conver-tool @ b116e277970b30c049cdfe2dc602609b845a8c49

A command line tool to manage ConVer projects.

Improved status command.
h3rald h3rald@h3rald.com
Thu, 11 Jun 2026 16:33:00 +0200
commit

b116e277970b30c049cdfe2dc602609b845a8c49

parent

a86564907d1825e28d6bbc37967edbe53369f7c4

1 files changed, 13 insertions(+), 1 deletions(-)

jump to
M src/conver.csrc/conver.c

@@ -308,6 +308,14 @@ }

if (!end) { break; }; // last line had no trailing newline line = end + 1; } + if (history_size > 0) + { + // Write release file + conver_release_t release = history[history_size-1]; + char version_string[5]; + snprintf(version_string, sizeof(version_string), "%03X%1X", release.score, release.metadata); + fs_write(CONVER_RELEASE_FILE, version_string); + } return CONVER_OK; }

@@ -532,13 +540,17 @@ }

int command_status() { + int result = parse_history(); + if (result != CONVER_OK) { + return result; + } uint16_t draft = 0; uint16_t release = 0; char *draft_string; char *release_string; size_t draft_len = 0; size_t release_len = 0; - int result = fs_read(CONVER_DRAFT_FILE, &draft_string, &draft_len); + result = fs_read(CONVER_DRAFT_FILE, &draft_string, &draft_len); if (result != CONVER_OK) { return print_result(result); }