From 3566d5fd873e89284daf8bb8eb8fe65bb215f19a Mon Sep 17 00:00:00 2001 From: alexlavrov Date: Mon, 15 Apr 2024 15:06:47 +0400 Subject: [PATCH] Allow using dot in version suffix. Remove deprecated RegExp.$ method --- build/replace-meta.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/replace-meta.js b/build/replace-meta.js index d6bcc2a5..e3ef9f18 100644 --- a/build/replace-meta.js +++ b/build/replace-meta.js @@ -17,9 +17,10 @@ const REPO_NAME = process.argv[4]; let META_VERSION_NUMERIC = "99.0.0"; let META_VERSION_FULL; -if(REPO_NAME === MAIN_REPO_NAME && /^v?(([.\d]+)[\w-]*)$/.test(TAG)) { - META_VERSION_FULL = RegExp.$1; - META_VERSION_NUMERIC = RegExp.$2; +const VERSION_MATCH = /^v?(([.\d]+)[\w.-]*)$/.exec(TAG) +if(REPO_NAME === MAIN_REPO_NAME && VERSION_MATCH) { + META_VERSION_FULL = VERSION_MATCH[1]; + META_VERSION_NUMERIC = VERSION_MATCH[2]; } else if(BUILD_NUMBER) { META_VERSION_FULL = META_VERSION_NUMERIC + "-ci-";