From 8f9e307930b371779c0917076b1927ed260c4a76 Mon Sep 17 00:00:00 2001 From: EgoMoose Date: Wed, 13 Mar 2024 12:50:41 -0400 Subject: [PATCH] Trim plugin version string (#890) Duplicate of https://github.com/rojo-rbx/rojo/pull/889, but based on master as per request. This PR is a very small change that fixes the string pattern that reads the rojo version from `Version.txt`. Currently this reads an extra new-line character which makes reading the version text in the plugin difficult. It seems the rust side of things already trims the string when comparing, but the lua side does not. --- plugin/src/Config.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/src/Config.lua b/plugin/src/Config.lua index 0238b2cb..5567efca 100644 --- a/plugin/src/Config.lua +++ b/plugin/src/Config.lua @@ -3,7 +3,8 @@ local strict = require(script.Parent.strict) local isDevBuild = script.Parent.Parent:FindFirstChild("ROJO_DEV_BUILD") ~= nil local Version = script.Parent.Parent.Version -local major, minor, patch, metadata = Version.Value:match("^(%d+)%.(%d+)%.(%d+)(.*)$") +local trimmedVersionValue = Version.Value:gsub("^%s+", ""):gsub("%s+$", "") +local major, minor, patch, metadata = trimmedVersionValue:match("^(%d+)%.(%d+)%.(%d+)(.*)$") local realVersion = { major, minor, patch, metadata } for i = 1, 3 do