Commit ee0bfaeb2e30959a830e75b2d7b084e591c29196

Authored by hitier
1 parent 3c0785d6

Fix wrong shell commands

Showing 2 changed files with 5 additions and 4 deletions   Show diff stats
resources/post-receive.git-hook
... ... @@ -47,7 +47,7 @@ do
47 47 if [ "$ref" = "refs/heads/$BRANCH" ];
48 48 then
49 49 echo "Ref $ref received. Deploying ${BRANCH} branch to production..."
50   - -d $TARGET || exit
  50 + [ -d $TARGET ] || exit
51 51 git --work-tree=$TARGET --git-dir=$GIT_DIR checkout -f $BRANCH
52 52 cd $TARGET || exit
53 53 touch *wsgi # now, trigger wsgidaemons restarting
... ...
scripts/post-deploy.sh
... ... @@ -4,11 +4,12 @@
4 4 #
5 5 # Should be execute within root directory of project
6 6  
  7 +SCRIPT=$(readlink -f "$0")
  8 +PROJECT_PATH=$(dirname "$SCRIPT")/..
7 9  
8   -cd ..
9 10  
10   -source ./venv/bin/activate
11   -pip install -r requirements.txt
  11 +. ${PROJECT_PATH}/venv/bin/activate
  12 +pip install -r ${PROJECT_PATH}/requirements.txt
12 13  
13 14 # Now run some cli post update commands
14 15 # flask db upgrade
... ...