Skip to content

Commit

Permalink
hotfix: cli.lua not build game correctly (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoDornelles authored Nov 26, 2024
1 parent 1734016 commit d184398
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Custom Configs
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "GlyEngine"
PROJECT_NUMBER = 0.0.14
PROJECT_NUMBER = 0.0.15
PROJECT_BRIEF = "Create games and apps with lua"
PROJECT_LOGO = assets/icon80x80.png
GENERATE_RTF = NO
Expand Down
1 change: 1 addition & 0 deletions mock/bootstrap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ end

io.open = function(filename, mode)
local file = real_io_open(filename, mode)
filename = (filename or ''):gsub('^./', '')

if javascript_fs then
file = javascript_io_open(filename, mode)
Expand Down
3 changes: 2 additions & 1 deletion src/lib/util/fs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ local function scan(type_file)

local hasfile = type_file
local firstchar = src:sub(1,1)
local secondchar = src:sub(2,2)
local windriver = string.match(src, '^([A-Z]):[/\\]')
local separator = (mock_separator or (_G.package and _G.package.config) or '/'):sub(1,1)

Expand All @@ -61,7 +62,7 @@ local function scan(type_file)
if firstchar == '/' or firstchar == '\\' or windriver then
self.windriver = windriver or 'C'
self.absolute = true
else
elseif firstchar ~= '.' and secondchar ~= '/' then
src = '.'..separator..src
end

Expand Down
2 changes: 1 addition & 1 deletion src/version.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
return '0.0.14'
return '0.0.15'
1 change: 1 addition & 0 deletions tools/cd_npm_gly-cli.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ cmd('mkdir -p ./dist/bin')
cmd('npx demoon ./dist/cli.lua compiler ./dist/cli.lua --dist ./dist/cli.out')
cmd('echo "#!/usr/bin/env -S npx demoon" > ./dist/header.txt')
cmd('cat ./dist/header.txt ./dist/cli.out > dist/bin/gly-cli')
cmd('chmod +x ./dist/bin/gly-cli')
cmd('rm ./dist/cli.lua ./dist/header.txt ./dist/cli.out')
cmd('./cli.sh fs-replace ./packages/npm_gly-cli/package.json ./dist/package.json --format "{{version}}" --replace '..version)
cmd('./cli.sh fs-replace README.md ./dist/README.md --format "lua cli.lua" --replace "npx gly-cli"')

0 comments on commit d184398

Please sign in to comment.