[ADD] Launch script: more documentation about usage
This commit is contained in:
parent
9bc5795300
commit
d043040b91
18
launch.sh
18
launch.sh
@ -78,6 +78,17 @@ show_help() {
|
||||
echo -e " - restore dump Restore the given dump"
|
||||
echo -e " - start args Launch Gissmo Docker container (created by 'create' command) with a name given in GISSMO_DOCKER_NAME variable. args is optional."
|
||||
echo -e " - stop Stop Gissmo Docker container which name is GISSMO_DOCKER_NAME variable content"
|
||||
echo ""
|
||||
echo "For an example you can use it in this order:"
|
||||
echo ""
|
||||
echo -e " $PROGRAM init"
|
||||
echo -e " $PROGRAM create"
|
||||
echo -e " $PROGRAM restore ~/2015.05.06.dump"
|
||||
echo -e " $PROGRAM migrate"
|
||||
echo -e " $PROGRAM dev"
|
||||
echo -e " $PROGRAM stop"
|
||||
echo -e " $PROGRAM start python manage.py shell"
|
||||
echo -e " $PROGRAM stop"
|
||||
# TODO: Add clean() command to STOP and DELETE Gissmo Docker container
|
||||
# TODO: Add clean_db() command to STOP and DELETE postgreSQL Docker container
|
||||
# TODO: Add clean_all() command that makes clean() and clean_db()
|
||||
@ -178,7 +189,12 @@ init() {
|
||||
else
|
||||
GIT_WORK_TREE="${GISSMO_DIR}/" GIT_DIR="${GISSMO_DIR}/.git/" git pull -q origin master || error_and_quit "Pull command on Git repository failed."
|
||||
fi
|
||||
info "Git repository checked."
|
||||
info "Git repository state checked."
|
||||
# install pre-commit hook that check code validity and more
|
||||
if ! test -f "${GISSMO_DIR}/.git/hooks/pre-commit"; then
|
||||
cp "${GISSMO_DIR}/scripts/git_hooks/pre-commit" "${GISSMO_DIR}/.git/hooks/pre-commit" || error_and_quit "Failed to install pre-commit hook."
|
||||
info "Git repository pre-commit hook installed."
|
||||
fi
|
||||
. bin/activate || error_and_quit "Failed entering python virtual environment"
|
||||
cd $GISSMO_DIR
|
||||
pip install -q -r requirements.txt || error_and_quit "Python dependancies installation failed."
|
||||
|
Loading…
Reference in New Issue
Block a user