Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nord Site
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Freifunk Nord
Nord Site
Commits
cae7ede7
Commit
cae7ede7
authored
7 years ago
by
rubo77
Browse files
Options
Downloads
Patches
Plain Diff
Tracis-CI check auf Validität der site.conf
parent
25fa2706
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.travis.yml
+13
-0
13 additions, 0 deletions
.travis.yml
tests/site_config.lua
+9
-0
9 additions, 0 deletions
tests/site_config.lua
tests/validate_site.sh
+6
-0
6 additions, 0 deletions
tests/validate_site.sh
with
28 additions
and
0 deletions
.travis.yml
0 → 100644
+
13
−
0
View file @
cae7ede7
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
This diff is collapsed.
Click to expand it.
tests/site_config.lua
0 → 100644
+
9
−
0
View file @
cae7ede7
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'
)),
{})()
This diff is collapsed.
Click to expand it.
tests/validate_site.sh
0 → 100644
+
6
−
0
View file @
cae7ede7
#!/bin/bash
# validate_site.sh checks if the site.conf is valid json
GLUON_SITEDIR
=
"."
lua5.1 tests/site_config.lua
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment