Skip to content

Commit 615e580

Browse files
authored
Merge pull request #65 from mikeller/change_travis_to_compile
Changed travis build to compile lua files.
2 parents f6c251f + 81ee230 commit 615e580

File tree

3 files changed

+13
-35
lines changed

3 files changed

+13
-35
lines changed

.travis.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
dist: trusty
22
sudo: false
33

4-
language: node_js
4+
addons:
5+
apt:
6+
packages:
7+
- lua5.2
8+
9+
language: c
510

6-
before_install:
7-
- npm install -g luamin
8-
- git checkout ./bin/travis-test.sh
911
install:
10-
- ./bin/travis-test.sh
12+
13+
script: ./bin/build.sh

bin/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ for f in ${MANIFEST[@]};
1717
do
1818
SRC_NAME=$f
1919
OBJ_NAME=$(dirname ${f})/$(basename ${f} .lua).luac
20-
node -e "var luac = require('luac'); luac.buildToFileSync('${SRC_NAME}', '${OBJ_NAME}');"
20+
echo -e "Compiling file \e[1m${SRC_NAME}\e[21m..." || \
21+
luac -o ${OBJ_NAME} ${SRC_NAME} || \
22+
echo -e "\e[1m\e[39m[\e[31mBUILD FAILED\e[39m]\e[21m Compilation error in file \e[1m${SRC_NAME}\e[21m!" || \
23+
exit 1
2124
done
2225

26+
echo -e "\e[1m\e[39m[\e[32mTEST SUCCESSFUL\e[39m]\e[21m All lua files built successfully!"

package.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)