From 85da9bdeb2f9e1e8bdbb311dfa1f5a8e286a8cd4 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Thu, 29 Oct 2020 12:41:15 +0000 Subject: [PATCH] Updated Ghost versioning lib to include all prerelease IDs - currently if Ghost has a version of something like `3.37.0-pre.abc.def`, Ghost will return `3.37.0-pre.abc` as the full version - this hides parts of the version which are useful for debugging - this commit updates the logic to join together all prerelease elements so we keep the full string --- core/server/lib/ghost-version.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/lib/ghost-version.js b/core/server/lib/ghost-version.js index acdf01db1c..568387c5a8 100644 --- a/core/server/lib/ghost-version.js +++ b/core/server/lib/ghost-version.js @@ -8,7 +8,7 @@ let _private = {}; _private.compose = function compose(type) { switch (type) { case 'pre': - return plainVersion + '-' + semver.prerelease(version)[0] + (semver.prerelease(version)[1] ? '.' + semver.prerelease(version)[1] : ''); + return plainVersion + '-' + semver.prerelease(version).join('.'); default: return version; }