Skip to content
Snippets Groups Projects
Commit cae7ede7 authored by rubo77's avatar rubo77
Browse files

Tracis-CI check auf Validität der site.conf

parent 25fa2706
No related branches found
No related tags found
No related merge requests found
language: bash
sudo: true
before_install:
- sudo apt-get -qq update
- sudo apt-get install lua5.1 luarocks
install:
- sudo luarocks install lua-cjson
script:
- bash tests/validate_site.sh
local config = os.getenv('GLUON_SITEDIR')
local function loader()
coroutine.yield('return ')
coroutine.yield(io.open(config .. '/site.conf'):read('*a'))
end
-- setfenv doesn't work with Lua 5.2 anymore, but we're using 5.1
return setfenv(assert(load(coroutine.wrap(loader), 'site.conf')), {})()
#!/bin/bash
# validate_site.sh checks if the site.conf is valid json
GLUON_SITEDIR="." lua5.1 tests/site_config.lua
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment