Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: tag prerelease builds with -pre #5943

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ set(LEAN_SPECIAL_VERSION_DESC "" CACHE STRING "Additional version description li
set(LEAN_VERSION_STRING "${LEAN_VERSION_MAJOR}.${LEAN_VERSION_MINOR}.${LEAN_VERSION_PATCH}")
if (LEAN_SPECIAL_VERSION_DESC)
string(APPEND LEAN_VERSION_STRING "-${LEAN_SPECIAL_VERSION_DESC}")
elseif (NOT LEAN_VERSION_IS_RELEASE)
string(APPEND LEAN_VERSION_STRING "-pre")
endif()

set(LEAN_PLATFORM_TARGET "" CACHE STRING "LLVM triple of the target platform")
Expand Down
6 changes: 1 addition & 5 deletions src/library/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,11 +861,7 @@ void initialize_library_util() {

sstream out;

out << LEAN_VERSION_MAJOR << "."
<< LEAN_VERSION_MINOR << "." << LEAN_VERSION_PATCH;
if (std::strlen(LEAN_SPECIAL_VERSION_DESC) > 0) {
out << "-" << LEAN_SPECIAL_VERSION_DESC;
}
out << LEAN_VERSION_STRING;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is just future proofing, but as written I think g_short_version_string is unneeded since it is equivalent to the compile time constant LEAN_VERSION_STRING.

g_short_version_string = new std::string(out.str());
if (std::strlen(LEAN_PLATFORM_TARGET) > 0) {
out << ", " << LEAN_PLATFORM_TARGET;
Expand Down
2 changes: 2 additions & 0 deletions src/version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
// Additional version description like "nightly-2018-03-11"
#define LEAN_SPECIAL_VERSION_DESC "@LEAN_SPECIAL_VERSION_DESC@"

#define LEAN_VERSION_STRING "@LEAN_VERSION_STRING@"

#define LEAN_PLATFORM_TARGET "@LEAN_PLATFORM_TARGET@"
Loading