You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using TravisCI to build and deploy to a remote repo.
When Travis calls the blt deploy command and commits the artifact to develop-build and pushes, on the remote server I want to capture this event in a post-receive hook and check out to the appropriate working directory.
Here is the post-receive hook:
#!/bin/sh
while read oldrev newrev ref
do
branch=`echo $ref | cut -d/ -f3-`
if [ "develop-build" == "$branch" ]; then
sudo git --work-tree=/data/websites/dev.mysite.org/web --git-dir=/var/repos/mysite-org.git checkout -f $branch
sudo chown -Rf www-data:www-data /data/websites/dev.mysite.org/web
fi
done
While I can see the change with git log -g, it doesn't appear that the checkout happens.
Is there something unique to the deploy/commit of the artifact branches that prevent this from working?
The text was updated successfully, but these errors were encountered:
I am using TravisCI to build and deploy to a remote repo.
When Travis calls the blt deploy command and commits the artifact to develop-build and pushes, on the remote server I want to capture this event in a post-receive hook and check out to the appropriate working directory.
Here is the post-receive hook:
While I can see the change with
git log -g
, it doesn't appear that the checkout happens.Is there something unique to the deploy/commit of the artifact branches that prevent this from working?
The text was updated successfully, but these errors were encountered: