Skip to content

Commit

Permalink
Merge 54496b8 into 6e9c086
Browse files Browse the repository at this point in the history
  • Loading branch information
jaumef committed Apr 3, 2017
2 parents 6e9c086 + 54496b8 commit aa946a1
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 15 deletions.
20 changes: 15 additions & 5 deletions hookshub/hooks/github_hooks/pull_request-powerp-docs_endPR.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ def arguments():
event = sys.argv[2]
return payload, event


# Creació i activació del virtalenv temporal
def virtualenv(venv=''):
import os
if not venv:
venv = 'foo'

os.system('/usr/bin/virtualenv %s' % venv)

activate = join(venv, 'bin', 'activate_this.py')
execfile(activate, dict(__file__=activate))


payload, event = arguments()

output = ''
Expand Down Expand Up @@ -130,11 +143,8 @@ def arguments():

# Instalem dependencies

output += '{} OK |'.format(Util.pip_requirements(clone_dir))

# Exportem PYTHONPATH

output += '{} OK |'.format(Util.export_pythonpath(clone_dir))
virtualenv(branch_name)
output += '{} |'.format(Util.pip_requirements(clone_dir) or 'OK')

# Fem build al directori on tenim la pagina des del directori del clone
# Build en català
Expand Down
20 changes: 15 additions & 5 deletions hookshub/hooks/github_hooks/pull_request-powerp-docs_newPR.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ def arguments():
event = sys.argv[2]
return payload, event


# Creació i activació del virtalenv temporal
def virtualenv(venv=''):
import os
if not venv:
venv = 'foo'

os.system('/usr/bin/virtualenv %s' % venv)

activate = join(venv, 'bin', 'activate_this.py')
execfile(activate, dict(__file__=activate))


payload, event = arguments()

output = ''
Expand Down Expand Up @@ -112,11 +125,8 @@ def arguments():

# Instalem dependencies

output += '{} OK |'.format(Util.pip_requirements(clone_dir))

# Exportem PYTHONPATH

output += '{} OK |'.format(Util.export_pythonpath(clone_dir))
virtualenv(branch_name)
output += '{} |'.format(Util.pip_requirements(clone_dir) or 'OK')

# Fem build al directori on tenim la pagina des del directori del clone
# Build en català
Expand Down
19 changes: 14 additions & 5 deletions hookshub/hooks/github_hooks/push-powerp-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ def arguments():
return payload, event


# Creació i activació del virtalenv temporal
def virtualenv(venv=''):
import os
if not venv:
venv = 'foo'

os.system('/usr/bin/virtualenv %s' % venv)

activate = join(venv, 'bin', 'activate_this.py')
execfile(activate, dict(__file__=activate))


payload, event = arguments()

output = ''
Expand Down Expand Up @@ -99,11 +111,8 @@ def arguments():

# Instalem dependencies

output += '{} OK |'.format(Util.pip_requirements(clone_dir))

# Exportem PYTHONPATH

output += '{} OK |'.format(Util.export_pythonpath(clone_dir))
virtualenv(branch_name)
output += '{} |'.format(Util.pip_requirements(clone_dir) or 'OK')

# Fem build al directori on tenim la pàgina des del directori del clone

Expand Down

0 comments on commit aa946a1

Please sign in to comment.