Test
This commit is contained in:
17
.github/workflows/minify.yml
vendored
17
.github/workflows/minify.yml
vendored
@@ -20,6 +20,11 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Lua
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y lua5.3
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
@@ -35,13 +40,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p release
|
mkdir -p release
|
||||||
|
|
||||||
echo "Testing main.lua minification only..."
|
echo "Checking Lua syntax first..."
|
||||||
|
if lua -e "loadfile('src/main.lua')" ; then
|
||||||
|
echo "Lua syntax is valid, proceeding with minification..."
|
||||||
if npx luamin -f src/main.lua > release/main.min.lua; then
|
if npx luamin -f src/main.lua > release/main.min.lua; then
|
||||||
echo "Main.lua minification successful"
|
echo "Main.lua minification successful"
|
||||||
else
|
else
|
||||||
echo "Lua syntax check failed. Trying to identify the error:"
|
echo "Minification failed"
|
||||||
# Versuche den Lua-Code zu parsen um Syntax-Fehler zu finden
|
exit 1
|
||||||
luac -p src/main.lua || echo "Lua syntax error detected"
|
fi
|
||||||
|
else
|
||||||
|
echo "Lua syntax error detected in main.lua"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -112,6 +112,5 @@ function basalt.run(isActive)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
basalt.autoUpdate = basalt.run
|
|
||||||
|
|
||||||
return basalt
|
return basalt
|
||||||
Reference in New Issue
Block a user