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
b944fb1a
Unverified
Commit
b944fb1a
authored
5 years ago
by
Ruben Barkow
Browse files
Options
Downloads
Patches
Plain Diff
validate_site.sh: generalize script to work also if no make-release.sh and no modules exist
parent
7f2c9c55
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/validate_site.sh
+38
-34
38 additions, 34 deletions
tests/validate_site.sh
with
38 additions
and
34 deletions
tests/validate_site.sh
+
38
−
34
View file @
b944fb1a
...
...
@@ -30,13 +30,15 @@ for c in $CONFIGS; do
echo
"OK:
$c
"
fi
done
#GLUON_SITEDIR="./" GLUON_SITE_CONFIG="" lua5.1 tests/site_config.lua
echo
"####### validating
$P
/make-release.sh ..."
bash
-n
"
$P
/make-release.sh"
if
[
"
$?
"
==
0
]
;
then
echo
"OK:
$P
/make-release.sh"
fi
for
BASHFILE
in
"
$P
"
/
*
.sh
;
do
[
-f
"
$BASHFILE
"
]
||
continue
echo
"####### validating
$BASHFILE
..."
bash
-n
"
$BASHFILE
"
if
[
"
$?
"
==
0
]
;
then
echo
"OK:
$BASHFILE
"
fi
done
echo
"####### validating
$P
/modules ..."
GLUON_SITE_FEEDS
=
"none"
...
...
@@ -45,34 +47,36 @@ testpath=/tmp/site-validate
rm
-Rf
"
$testpath
"
mkdir
-p
"
$testpath
/packages"
cd
"
$testpath
/packages"
for
feed
in
$GLUON_SITE_FEEDS
;
do
echo
"####### checking PACKAGES_
${
feed
^^
}
_REPO ..."
repo_var
=
"PACKAGES_
${
feed
^^
}
_REPO"
commit_var
=
"PACKAGES_
${
feed
^^
}
_COMMIT"
branch_var
=
"PACKAGES_
${
feed
^^
}
_BRANCH"
repo
=
"
${
!repo_var
}
"
commit
=
"
${
!commit_var
}
"
branch
=
"
${
!branch_var
}
"
if
[
"
$repo
"
==
""
]
;
then
echo
"repo
$repo_var
missing"
exit
1
fi
if
[
"
$commit
"
==
""
]
;
then
echo
"commit
$commit_var
missing"
exit
1
fi
if
[
"
$branch
"
==
""
]
;
then
echo
"branch
$branch_var
missing"
exit
1
fi
git clone
-b
"
$branch
"
--depth
1000
--single-branch
"
$repo
"
"
$feed
"
if
[
"
$?
"
!=
"0"
]
;
then
exit
1
;
fi
cd
"
$feed
"
echo
"git checkout
$commit
"
git checkout
"
$commit
"
if
[
"
$?
"
!=
"0"
]
;
then
exit
1
;
fi
cd
-
done
if
[
"
$GLUON_SITE_FEEDS
"
!=
"none"
]
;
then
for
feed
in
$GLUON_SITE_FEEDS
;
do
echo
"####### checking PACKAGES_
${
feed
^^
}
_REPO ..."
repo_var
=
"PACKAGES_
${
feed
^^
}
_REPO"
commit_var
=
"PACKAGES_
${
feed
^^
}
_COMMIT"
branch_var
=
"PACKAGES_
${
feed
^^
}
_BRANCH"
repo
=
"
${
!repo_var
}
"
commit
=
"
${
!commit_var
}
"
branch
=
"
${
!branch_var
}
"
if
[
"
$repo
"
==
""
]
;
then
echo
"repo
$repo_var
missing"
exit
1
fi
if
[
"
$commit
"
==
""
]
;
then
echo
"commit
$commit_var
missing"
exit
1
fi
if
[
"
$branch
"
==
""
]
;
then
echo
"branch
$branch_var
missing"
exit
1
fi
git clone
-b
"
$branch
"
--depth
1000
--single-branch
"
$repo
"
"
$feed
"
if
[
"
$?
"
!=
"0"
]
;
then
exit
1
;
fi
cd
"
$feed
"
echo
"git checkout
$commit
"
git checkout
"
$commit
"
if
[
"
$?
"
!=
"0"
]
;
then
exit
1
;
fi
cd
-
done
fi
echo
"####### Lua linter check for all package feeds ..."
~/.luarocks/bin/luacheck
--config
"
$P
/tests/.luacheckrc"
"
$testpath
/packages"
...
...
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