fix post-receive hook again. dumbass
This commit is contained in:
parent
c716dcb35d
commit
b54075c485
|
@ -1,23 +1,24 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
export GIT_DIR=$(git rev-parse --absolute-git-dir)
|
|
||||||
|
|
||||||
while read old new refname; do
|
while read old new refname; do
|
||||||
|
|
||||||
|
export GIT_DIR=$(git rev-parse --absolute-git-dir)
|
||||||
branch=$(git rev-parse --abbrev-ref=strict ${refname})
|
branch=$(git rev-parse --abbrev-ref=strict ${refname})
|
||||||
|
|
||||||
if [[ $branch == "deploy" ]]; then
|
if [[ $branch == "deploy" ]]; then
|
||||||
|
|
||||||
cd "$HOME/forget"
|
cd "$HOME/forget"
|
||||||
|
|
||||||
(
|
export GIT_DIR="$PWD/.git"
|
||||||
unset GIT_DIR
|
|
||||||
unset GIT_WORK_TREE
|
git checkout deploy
|
||||||
git checkout deploy
|
git fetch --prune origin
|
||||||
git reset --hard upstream/deploy
|
git reset --hard origin/deploy
|
||||||
)
|
|
||||||
|
|
||||||
(
|
(
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
env -u GIT_DIR -u GIT_WORK_TREE pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
yarn
|
yarn
|
||||||
FLASK_APP='forget.py' flask db upgrade
|
FLASK_APP='forget.py' flask db upgrade
|
||||||
if [[ $(git diff --name-only ${old}..${new} dodo.py) == 'dodo.py' ]]
|
if [[ $(git diff --name-only ${old}..${new} dodo.py) == 'dodo.py' ]]
|
||||||
|
|
Loading…
Reference in New Issue