release: adjust doc_link() for the post source-available world
There is no more separate enterprise product and the doc urls are slightly different.
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
|
||||
#include <seastar/core/format.hh>
|
||||
|
||||
static const char scylla_product_str[] = SCYLLA_PRODUCT;
|
||||
static const char scylla_version_str[] = SCYLLA_VERSION;
|
||||
static const char scylla_release_str[] = SCYLLA_RELEASE;
|
||||
static const char scylla_build_mode_str[] = SCYLLA_BUILD_MODE_STR;
|
||||
@@ -31,12 +30,9 @@ std::string scylla_build_mode()
|
||||
}
|
||||
|
||||
std::string doc_link(std::string_view url_tail) {
|
||||
const std::string_view product = scylla_product_str;
|
||||
const std::string_view version = scylla_version_str;
|
||||
|
||||
const auto prefix = product == "scylla-enterprise" ? "enterprise" : "opensource";
|
||||
|
||||
std::string branch = product == "scylla-enterprise" ? "enterprise" : "master";
|
||||
std::string branch = "master";
|
||||
if (!version.ends_with("~dev")) {
|
||||
std::vector<std::string> components;
|
||||
boost::split(components, version, boost::algorithm::is_any_of("."));
|
||||
@@ -45,7 +41,7 @@ std::string doc_link(std::string_view url_tail) {
|
||||
branch = fmt::format("branch-{}.{}", components[0], components[1]);
|
||||
}
|
||||
|
||||
return fmt::format("https://{}.docs.scylladb.com/{}/{}", prefix, branch, url_tail);
|
||||
return fmt::format("https://docs.scylladb.com/manual/{}/{}", branch, url_tail);
|
||||
}
|
||||
|
||||
// get the version number into writeable memory, so we can grep for it if we get a core dump
|
||||
|
||||
Reference in New Issue
Block a user