Fix autoupdate package version nil (#3982)

pull/3988/head
Jérôme Leclercq 7 months ago committed by GitHub
parent c8c1546a86
commit 480ba32510
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      scripts/autoupdate.lua

@ -69,8 +69,8 @@ function _update_version(instance, version, shasum)
os.vexec("git checkout %s", branch)
local inserted = false
local scriptfile = path.join(instance:scriptdir(), "xmake.lua")
if os.isfile(scriptfile) then
local version_current
if os.isfile(scriptfile) then
io.gsub(scriptfile, "add_versions%(\"(.-)\",%s+\"(.-)\"%)", function (v, h)
if not version_current or semver.compare(v, version_current) > 0 then
version_current = v

Loading…
Cancel
Save