mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
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.
This commit is contained in:
parent
856d43ce69
commit
8f9e307930
1 changed files with 2 additions and 1 deletions
|
|
@ -3,7 +3,8 @@ local strict = require(script.Parent.strict)
|
||||||
local isDevBuild = script.Parent.Parent:FindFirstChild("ROJO_DEV_BUILD") ~= nil
|
local isDevBuild = script.Parent.Parent:FindFirstChild("ROJO_DEV_BUILD") ~= nil
|
||||||
|
|
||||||
local Version = script.Parent.Parent.Version
|
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 }
|
local realVersion = { major, minor, patch, metadata }
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue