This repository has been archived on 2020-01-17. You can view files and clone it, but cannot push or open issues or pull requests.
2018-04-19 10:35:41 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
while read oldrev newrev ref
|
|
|
|
do
|
2018-05-02 06:32:19 +00:00
|
|
|
if [[ ! $ref =~ .*/master$ ]]; then
|
2018-04-19 10:35:41 +00:00
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
|
|
|
repoDir=$(dirname "$0")/..
|
|
|
|
projectName=$(basename "$(realpath "$repoDir")")
|
|
|
|
|
|
|
|
echo "Ref $ref received. It will be deployed automatically."
|
|
|
|
|
2018-04-20 11:34:49 +00:00
|
|
|
#echo "$projectName" "master" > /tmp/vn-repo.changes
|
2018-04-20 11:51:49 +00:00
|
|
|
nohup sudo -u vn-repo vn-branch $projectName &> /dev/null &
|
2018-04-19 10:35:41 +00:00
|
|
|
done
|