build(checks): added check file script used for building images
This commit is contained in:
parent
694b2bad41
commit
d60f55ad06
1 changed files with 31 additions and 0 deletions
31
rhodecode/tests/scripts/static-file-check.sh
Executable file
31
rhodecode/tests/scripts/static-file-check.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
# check required files
|
||||
# run like this: rhodecode/tests/scripts/static-file-check.sh rhodecode/public/
|
||||
|
||||
STATIC_CHECK="\
|
||||
robots.txt \
|
||||
502.html \
|
||||
js/scripts.min.js \
|
||||
js/rhodecode-components.js \
|
||||
css/style.css \
|
||||
css/style-polymer.css \
|
||||
css/style-ipython.css"
|
||||
|
||||
static_path=$1
|
||||
echo "checking the path for static files in dir: '$static_path'"
|
||||
|
||||
if [ ! -d $static_path ]; then
|
||||
echo "path $static_path is not a valid directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for file in $STATIC_CHECK;
|
||||
do
|
||||
path=$static_path$file
|
||||
printf "checking $path..."
|
||||
if [ ! -f $path ]; then
|
||||
echo ""
|
||||
echo "Missing a static file:$path expected after web-build"
|
||||
exit 1
|
||||
fi
|
||||
printf "ok\n"
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue