use shallow git checkouts

This commit is contained in:
j 2016-02-12 14:02:24 +05:30
parent 691b3fa934
commit 81ade83945
3 changed files with 6 additions and 6 deletions

4
README
View file

@ -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

View file

@ -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'])

View file

@ -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