Initial support for hg.
parent
40e7572751
commit
f59406c548
|
@ -2,3 +2,4 @@
|
|||
*.swp
|
||||
*.db
|
||||
doc_root
|
||||
user_builds
|
||||
|
|
|
@ -27,16 +27,15 @@ def update_docs(slug, type='git'):
|
|||
os.chdir(project.slug)
|
||||
if type is 'git':
|
||||
command = 'git fetch && git reset --hard origin/master'
|
||||
else:
|
||||
command = 'hg pull'
|
||||
print command
|
||||
run(command)
|
||||
else:
|
||||
command = 'git fetch && git reset --hard origin/master'
|
||||
else:
|
||||
if type is 'git':
|
||||
repo = project.repo
|
||||
if type is 'git':
|
||||
repo.replace('.git', '')
|
||||
command = 'git clone %s.git %s' % (repo, project.slug)
|
||||
print command
|
||||
else:
|
||||
command = 'hg clone %s %s' % (repo, project.slug)
|
||||
print command
|
||||
|
@ -66,8 +65,10 @@ def build_docs(project):
|
|||
project.write_conf()
|
||||
|
||||
try:
|
||||
make_dir = project.find('Makefile')[0].replace('/Makefile', '')
|
||||
makes = [makefile for makefile in project.find('Makefile') if 'doc' in makefile]
|
||||
make_dir = makes[0].replace('/Makefile', '')
|
||||
os.chdir(make_dir)
|
||||
print make_dir
|
||||
os.system('make html')
|
||||
except IndexError:
|
||||
os.chdir(conf_dir)
|
||||
|
|
|
@ -11,7 +11,7 @@ ADMINS = (
|
|||
MANAGERS = ADMINS
|
||||
|
||||
SITE_ROOT = '/'.join(os.path.dirname(__file__).split('/')[0:-1])
|
||||
DOCROOT = os.path.join(SITE_ROOT, 'doc_root')
|
||||
DOCROOT = os.path.join(SITE_ROOT, 'user_builds')
|
||||
|
||||
MEDIA_ROOT = '%s/media/' % (SITE_ROOT)
|
||||
MEDIA_URL = '/media/'
|
||||
|
|
Loading…
Reference in New Issue