Fixing server when no git files, not on master
Allows server to run even if on another branch than master and/or in a production scenario without git files available.
This commit is contained in:
parent
9bc8934970
commit
0541082804
1 changed files with 7 additions and 3 deletions
|
|
@ -76,7 +76,11 @@ fi
|
||||||
|
|
||||||
# Force AGPL
|
# Force AGPL
|
||||||
if [ -w public -a ! -e public/source.tar.gz ]; then
|
if [ -w public -a ! -e public/source.tar.gz ]; then
|
||||||
tar czf public/source.tar.gz `git ls-tree -r master | awk '{print $4}'`
|
if [ -r config/git-ls-tree ]; then
|
||||||
|
tar czf public/source.tar.gz $( cat config/git-ls-tree)
|
||||||
|
else
|
||||||
|
tar czf public/source.tar.gz `git ls-tree -r master | awk '{print $4}'`
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -e public/source.tar.gz ]; then
|
if [ ! -e public/source.tar.gz ]; then
|
||||||
echo "Error: Can't find, or even create, public/source.tar.gz. Exiting" >&2
|
echo "Error: Can't find, or even create, public/source.tar.gz. Exiting" >&2
|
||||||
|
|
@ -84,13 +88,13 @@ if [ ! -e public/source.tar.gz ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Precache jammit assets
|
# Precache jammit assets
|
||||||
if [[ -w public && ! -e public/stylesheets/application.css ]]; then
|
if [[ -w public && ! -e 'public/stylesheets/application.css' ]]; then
|
||||||
if [ "$INIT_PUBLIC" != 'no' ]; then
|
if [ "$INIT_PUBLIC" != 'no' ]; then
|
||||||
echo "Making first-time server initialization."
|
echo "Making first-time server initialization."
|
||||||
init_public
|
init_public
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -e 'public/assets/main.js.gz' ]; then
|
if [ ! -e 'public/stylesheets/application.css' ]; then
|
||||||
echo 'Jammit precache error (now or at install)' >&2
|
echo 'Jammit precache error (now or at install)' >&2
|
||||||
exit 66
|
exit 66
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue