Skip to content

Commit

Permalink
Fix print-release.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
tocuto committed Oct 30, 2021
1 parent 7fd5436 commit b17b40b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions print-release.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ end
local release = require(path)
if release.debug then
local version = release.version .. os.date(".%Y.%m.%d.%H.%M.%S.debug")
local oldVersion = string.gsub(release.version, "%.", "%%%.")
local oldVersion = string.gsub(release.version, "%.", "%%.")

local file = io.open(path .. ".lua")
local content = file:read("*a")
file:close()

file = io.open(path .. ".lua", "w")
file:write(string.gsub(
file:write((string.gsub(
content,
"(version%s*=%s*[\"'])" .. oldVersion .. "([\"'])",
"%1" .. version .. "%2",
1
))
)))
file:flush()

print("::set-output name=version::v" .. version)
Expand Down

0 comments on commit b17b40b

Please sign in to comment.