diff --git a/CHANGES.md b/CHANGES.md index 118aac06..97abb3cc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,16 @@ # Major changes to the IOCCC entry toolkit +## Release 1.6.2 2024-10-23 + +Fix annoying bug where the `MKIOCCCENTRY_ANSWERS_VERSION` could not be in +`soup/version.h` and the `MKIOCCCENTRY_ANSWERS_EOF` could not be in +`mkiocccentry.h`. + +Fix `write_echo()` in `test_ioccc/prep.sh` to not leave lines in the log file +that simply say `OK`. + + ## Release 1.6.1 2024-10-22 Sync the `jparse/` directory with state, as of 2024-10-22, of the diff --git a/mkiocccentry.c b/mkiocccentry.c index 673f1274..bab4a2d3 100644 --- a/mkiocccentry.c +++ b/mkiocccentry.c @@ -95,24 +95,6 @@ */ #define REQUIRED_ARGS (4) /* number of required arguments on the command line */ -/* - * Answers file constants. - * - * Version of answers file. - * Use format: - * - * MKIOCCCENTRY_ANSWERS-IOCCCMOCK-major.minor - * MKIOCCCENTRY_ANSWERS-IOCCC[0-9[0-9]-major.minor - * - * The following is NOT the version of this mkiocccentry tool! - * - * NOTE: these MUST be here and NOT in version.h or in mkiocccentry.h! - */ -#define MKIOCCCENTRY_ANSWERS_VERSION "MKIOCCCENTRY_ANSWERS_IOCCC28-1.0" -/* Answers file EOF marker */ -#define MKIOCCCENTRY_ANSWERS_EOF "ANSWERS_EOF" - - /* * usage message * diff --git a/mkiocccentry.h b/mkiocccentry.h index 04f7964c..076633fd 100644 --- a/mkiocccentry.h +++ b/mkiocccentry.h @@ -107,18 +107,12 @@ */ #include "soup/entry_util.h" -/* - * mkiocccentry tool basename - */ -#define MKIOCCCENTRY_BASENAME "mkiocccentry" - - /* * definitions * - * NOTE: MKIOCCCENTRY_ANSWERS_VERSION and MKIOCCCENTRY_ANSWERS_EOF must be defined - * in mkiocccentry.c and not here. */ +#define MKIOCCCENTRY_BASENAME "mkiocccentry" /* mkiocccentry tool basename for -V/-h */ +#define MKIOCCCENTRY_ANSWERS_EOF "ANSWERS_EOF" /* answers file EOF marker */ #define ISO_3166_1_CODE_URL0 "\thttps://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements" #define ISO_3166_1_CODE_URL1 "\thttps://en.wikipedia.org/wiki/ISO_3166-1_alpha-2" #define ISO_3166_1_CODE_URL2 "\thttps://www.iso.org/obp/ui/#iso:pub:PUB500001:en" diff --git a/soup/version.h b/soup/version.h index 7968618e..45142ffa 100644 --- a/soup/version.h +++ b/soup/version.h @@ -66,7 +66,8 @@ * * NOTE: This should match the latest Release string in CHANGES.md */ -#define MKIOCCCENTRY_REPO_VERSION "1.6.1 2024-10-22" /* special release format: major.minor.patch YYYY-MM-DD */ +#define MKIOCCCENTRY_REPO_VERSION "1.6.2 2024-10-23" /* special release format: major.minor.patch YYYY-MM-DD */ + /* * official soup version (aka recipe :-) ) @@ -79,9 +80,10 @@ #define IOCCCSIZE_VERSION "28.15 2024-06-27" /* format: major.minor YYYY-MM-DD */ /* - * official mkiocccentry version + * official mkiocccentry versions (mkiocccentry itself and answers) */ #define MKIOCCCENTRY_VERSION "1.0.8 2024-08-23" /* format: major.minor YYYY-MM-DD */ +#define MKIOCCCENTRY_ANSWERS_VERSION "MKIOCCCENTRY_ANSWERS_IOCCC28-1.0" /* answers file version */ /* * Version of info for JSON the .info.json file. diff --git a/test_ioccc/mkiocccentry_test.sh b/test_ioccc/mkiocccentry_test.sh index 2d8bfd3f..c5d7bff5 100755 --- a/test_ioccc/mkiocccentry_test.sh +++ b/test_ioccc/mkiocccentry_test.sh @@ -338,7 +338,7 @@ EOF } rm -f answers.txt # Retrieve the answers version from mkiocccentry.c and write to answers file: -grep -E '^#define MKIOCCCENTRY_ANSWERS_VERSION' mkiocccentry.c | cut -d' ' -f3 | sed 's/"//g' >answers.txt +grep -E '^#define MKIOCCCENTRY_ANSWERS_VERSION' soup/version.h | cut -d' ' -f3 | sed 's/"//g' >answers.txt # Append answers + EOF marker # # We disable this shellcheck error because answers already is defined but we @@ -445,7 +445,7 @@ EOF } rm -f answers.txt # Retrieve the answers version from mkiocccentry.c and write to answers file: -grep -E '^#define MKIOCCCENTRY_ANSWERS_VERSION' mkiocccentry.c | cut -d' ' -f3 | sed 's/"//g' >answers.txt +grep -E '^#define MKIOCCCENTRY_ANSWERS_VERSION' soup/version.h | cut -d' ' -f3 | sed 's/"//g' >answers.txt # Append answers + EOF marker # # We disable this shellcheck error because answers already is defined but we @@ -531,7 +531,7 @@ EOF } rm -f answers.txt # Retrieve the answers version from mkiocccentry.c and write to answers file: -grep -E '^#define MKIOCCCENTRY_ANSWERS_VERSION' mkiocccentry.c | cut -d' ' -f3 | sed 's/"//g' >answers.txt +grep -E '^#define MKIOCCCENTRY_ANSWERS_VERSION' soup/version.h | cut -d' ' -f3 | sed 's/"//g' >answers.txt # Append answers + EOF marker answers >>answers.txt diff --git a/test_ioccc/prep.sh b/test_ioccc/prep.sh index ff778479..431b1fe7 100755 --- a/test_ioccc/prep.sh +++ b/test_ioccc/prep.sh @@ -143,7 +143,11 @@ write_echo() local MSG="$*" if [[ -n "$LOGFILE" ]]; then - echo "$MSG" | tee -a -- "$LOGFILE" + if [[ "$MSG" != "OK" ]]; then + echo "$MSG" | tee -a -- "$LOGFILE" + else + echo "$MSG" + fi else echo "$MSG" 1>&2 fi