Skip to content

Commit

Permalink
Merge be4c6aa into 6e9c086
Browse files Browse the repository at this point in the history
  • Loading branch information
jaumef committed Apr 3, 2017
2 parents 6e9c086 + be4c6aa commit cf049d7
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
16 changes: 16 additions & 0 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,21 @@ 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))
os.system('pip install -r requirements.txt')
os.system('pip freeze')


payload, event = arguments()

output = ''
Expand Down Expand Up @@ -130,6 +145,7 @@ def arguments():

# Instalem dependencies

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

# Exportem PYTHONPATH
Expand Down
16 changes: 16 additions & 0 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,21 @@ 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))
os.system('pip install -r requirements.txt')
os.system('pip freeze')


payload, event = arguments()

output = ''
Expand Down Expand Up @@ -112,6 +127,7 @@ def arguments():

# Instalem dependencies

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

# Exportem PYTHONPATH
Expand Down
15 changes: 15 additions & 0 deletions hookshub/hooks/github_hooks/push-powerp-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ 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))
os.system('pip install -r requirements.txt')
os.system('pip freeze')


payload, event = arguments()

output = ''
Expand Down Expand Up @@ -99,6 +113,7 @@ def arguments():

# Instalem dependencies

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

# Exportem PYTHONPATH
Expand Down

0 comments on commit cf049d7

Please sign in to comment.