From 8822fd3902d3bb770483deac9eb4bd13cac33b42 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 25 Sep 2020 05:09:29 -0400 Subject: Support suffixes on version numbers This extends the versioning from just an integer trip to also support a suffix of the form -{alpha,beta,rc}N Also fix a problem with reproducible releases caused by Python tarfile switching its default format from GNU to PAX. Use PAX for the releases that were (unintentionally) released as PAX and GNU for everything else. --- src/lib/utils/version.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/lib/utils/version.cpp') diff --git a/src/lib/utils/version.cpp b/src/lib/utils/version.cpp index ccf83bf6c..aa82d7cc9 100644 --- a/src/lib/utils/version.cpp +++ b/src/lib/utils/version.cpp @@ -23,7 +23,11 @@ const char* short_version_cstr() { return STR(BOTAN_VERSION_MAJOR) "." STR(BOTAN_VERSION_MINOR) "." - STR(BOTAN_VERSION_PATCH); + STR(BOTAN_VERSION_PATCH) +#if defined(BOTAN_VERSION_SUFFIX) + STR(BOTAN_VERSION_SUFFIX) +#endif + ; } const char* version_cstr() @@ -36,7 +40,11 @@ const char* version_cstr() return "Botan " STR(BOTAN_VERSION_MAJOR) "." STR(BOTAN_VERSION_MINOR) "." - STR(BOTAN_VERSION_PATCH) " (" + STR(BOTAN_VERSION_PATCH) +#if defined(BOTAN_VERSION_SUFFIX) + STR(BOTAN_VERSION_SUFFIX) +#endif + " (" #if defined(BOTAN_UNSAFE_FUZZER_MODE) "UNSAFE FUZZER MODE BUILD " #endif -- cgit v1.2.3