aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2020-09-25 05:09:29 -0400
committerJack Lloyd <[email protected]>2020-09-25 07:34:30 -0400
commit8822fd3902d3bb770483deac9eb4bd13cac33b42 (patch)
treeb9082f5976c62da7b1577e0640dc02144fa04cc5 /src/lib
parentd317d8f00baef362609f80b4bad3e63582acfe83 (diff)
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.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/utils/version.cpp12
1 files changed, 10 insertions, 2 deletions
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