Last active
October 22, 2018 12:10
-
-
Save toransahu/9ec01e7fbf034e0981d917d7275334f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# post-receive | |
# Copyright (C) 2018 Toran Sahu <toran.sahu@yahoo.com> | |
# | |
# Distributed under terms of the MIT license. | |
# Ref: https://www.digitalocean.com/community/tutorials/how-to-use-git-hooks-to-automate-development-and-deployment-tasks | |
GIT_BARE_REPO="/home/ubuntu/ethereal-machines/ethereal-machines-backend-hook" | |
GIT_WORK_TREE="/home/ubuntu/ethereal-machines/ethereal-machines-backend" | |
echo "[Info] - Running on " $(hostname) | |
echo "[Info] - Using "$SHELL "shell" | |
echo "[Info] - Received "$ref "ref" | |
echo "[Info] - Checking out to working directory "$GIT_WORK_TREE | |
git --work-tree=$GIT_WORK_TREE --git-dir=$GIT_BARE_REPO checkout -f | |
cd $GIT_WORK_TREE | |
echo "[Info] - Activating virtual environment using Pipenv" | |
echo "[Info] - Syncing dependencies within virtual environment" | |
exec /home/ubuntu/miniconda3/bin/pipenv sync |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment