diff --git a/.travis.yml b/.travis.yml index 97d1ace..eabd8ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,10 +18,11 @@ before_install: - pip install --user cpp-coveralls - luarocks install Lua-cURL --server=https://luarocks.org/dev - luarocks install luacov-coveralls --server=https://luarocks.org/dev - - luarocks install telescope 0.6.0 --server=http://rocks.moonscript.org + - luarocks install telescope --server=http://rocks.moonscript.org + - bash .travis/fixtsc.sh script: "tsc -f specs/*" - + after_success: - luacov-coveralls -c .luacov -e 30log- diff --git a/.travis/fixtsc.sh b/.travis/fixtsc.sh new file mode 100644 index 0000000..7ff0301 --- /dev/null +++ b/.travis/fixtsc.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +# A script for fixing telescope to run with lua 5.2 and 5.3 + + + if [ "$LUA" == "lua5.2" ]; then + sed 's/compat_env.setfenv/compat_env.setfenv\nlocal unpack = unpack or table.unpack/' ${TRAVIS_BUILD_DIR}/install/luarocks/share/lua/5.2/telescope.lua + elif [ "$LUA" == "lua5.3" ]; then + sed 's/compat_env.setfenv/compat_env.setfenv\nlocal unpack = unpack or table.unpack/' ${TRAVIS_BUILD_DIR}/install/luarocks/share/lua/5.3/telescope.lua + fi +