From c89167800a9c26b7e682c6d4d430aebb8b19009e Mon Sep 17 00:00:00 2001 From: Guba Sándor <guba.sandor@cloud.bme.hu> Date: Mon, 22 Sep 2014 12:36:19 +0200 Subject: [PATCH] settings: updated agent directory structure --- circle/circle/settings/base.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/circle/circle/settings/base.py b/circle/circle/settings/base.py index 79ae63c..3e7b86e 100644 --- a/circle/circle/settings/base.py +++ b/circle/circle/settings/base.py @@ -431,9 +431,18 @@ LOGIN_REDIRECT_URL = "/" AGENT_DIR = get_env_variable( 'DJANGO_AGENT_DIR', join(unicode(expanduser("~")), 'agent')) + # AGENT_DIR is the root directory for the agent. + # The directory structure SHOULD be: + # /home/username/agent + # |-- agent-linux + # | |-- .git + # | +-- ... + # |-- agent-win + # | +-- agent-win-%(version).exe + # try: - git_env = {'GIT_DIR': join(AGENT_DIR, '.git')} + git_env = {'GIT_DIR': join(join(AGENT_DIR, "agent-linux"), '.git')} AGENT_VERSION = check_output( ('git', 'log', '-1', r'--pretty=format:%h', 'HEAD'), env=git_env) except: -- libgit2 0.26.0