From 81ade83945c089291aba706494049870512b8130 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 12 Feb 2016 14:02:24 +0530 Subject: [PATCH] use shallow git checkouts --- README | 4 ++-- update.py | 4 ++-- vm/pandora_install.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README b/README index bb4ddde3..ab02dfb2 100644 --- a/README +++ b/README @@ -56,13 +56,13 @@ You have to use the same password here and in BROKER_URL in local_settings.py 1) Get code from git cd /srv/ - git clone https://git.0x260.org/pandora.git pandora + git clone --depth 1 https://git.0x260.org/pandora.git pandora cd pandora virtualenv --system-site-packages . ./bin/pip install -r requirements.txt cd static - git clone https://git.0x2620.org/oxjs.git + git clone --depth 1 https://git.0x2620.org/oxjs.git cd /srv chown -R pandora.pandora pandora diff --git a/update.py b/update.py index b7d71d72..5d340195 100755 --- a/update.py +++ b/update.py @@ -165,7 +165,7 @@ if __name__ == "__main__": if not os.path.exists('./static/oxjs/.git'): if os.path.exists('static/oxjs'): shutil.move('static/oxjs', 'static/oxjs_bzr') - run('git', 'clone', 'https://git.0x2620.org/oxjs.git', 'static/oxjs') + run('git', 'clone', '--depth', '1', 'https://git.0x2620.org/oxjs.git', 'static/oxjs') run('./pandora/manage.py', 'update_static') if os.path.exists('static/oxjs_bzr'): shutil.rmtree('static/oxjs_bzr') @@ -210,7 +210,7 @@ if __name__ == "__main__": pandora_new_revno = revno else: os.chdir(os.path.dirname(path)) - cmd = ['git', 'clone', repos[repo]['url']] + cmd = ['git', 'clone', '--depth', '1', repos[repo]['url']] run(*cmd) if 'revision' in repos[repo]: run_git(path, 'checkout', repos[repo]['commit']) diff --git a/vm/pandora_install.sh b/vm/pandora_install.sh index 9b7e8227..bc2b48df 100755 --- a/vm/pandora_install.sh +++ b/vm/pandora_install.sh @@ -85,8 +85,8 @@ rabbitmqctl add_vhost /pandora rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*" #pandora -git clone https://git.0x2620.org/pandora.git /srv/pandora -git clone https://git.0x2620.org/oxjs.git /srv/pandora/static/oxjs +git clone --depth 1 https://git.0x2620.org/pandora.git /srv/pandora +git clone --depth 1 https://git.0x2620.org/oxjs.git /srv/pandora/static/oxjs virtualenv --system-site-packages /srv/pandora cd /srv/pandora ./bin/pip install -r /srv/pandora/requirements.txt