This commit is contained in:
Robert Jelic
2025-02-16 15:23:10 +01:00
parent 0669ba7621
commit 6d9ed5efa1
3 changed files with 9 additions and 10 deletions

View File

@@ -27,7 +27,8 @@ jobs:
# Step 1: Config Generation # Step 1: Config Generation
- name: Generate Config - name: Generate Config
run: | run: |
lua tools/generate-config.lua cd $GITHUB_WORKSPACE
lua tools/annotationParser.lua src/elements src/LuaLS.lua
# Step 2: Generate LuaLS Definitions # Step 2: Generate LuaLS Definitions
- name: Generate LuaLS - name: Generate LuaLS
@@ -69,6 +70,6 @@ jobs:
run: | run: |
git config --global user.name 'github-actions[bot]' git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add config.lua src/LuaLS.lua release/basalt.lua CHANGELOG.md git add config.lua "src/LuaLS.lua" release/basalt.lua CHANGELOG.md
git commit -m "Update config, LuaLS definitions, bundle and changelog" || exit 0 git commit -m "Update config, LuaLS definitions, bundle and changelog" || exit 0
git push git push

View File

@@ -201,5 +201,4 @@ function basalt.getAPI(name)
return elementManager.getAPI(name) return elementManager.getAPI(name)
end end
return basalt return basalt

View File

@@ -25,13 +25,12 @@ end
local function scanDir(dir) local function scanDir(dir)
local files = {} local files = {}
for file in io.popen('find "'..dir..'" -type f -name "*.lua"'):lines() do for file in io.popen('find "'..dir..'" -type f -name "*.lua"'):lines() do
local f = io.open(file, "r") local name = file:match("([^/]+)%.lua$")
if f then if name then
local content = f:read("*all") files[file] = {
f:close() name = name,
-- Entferne den src/ Prefix vom Pfad für die Config path = file:gsub("^src/", ""),
local configPath = file:gsub("^src/", "") }
files[configPath] = content
end end
end end
return files return files