Skip to content
Snippets Groups Projects
Commit 6ca3bf1d203c authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:rocket: pull isort to be sure to be on latest version

also use working directory option rather than a sh with a cd
parent cb2b7c4daf2d
No related branches found
No related tags found
No related merge requests found
......@@ -32,5 +32,5 @@
_logger = logging.getLogger(__name__)
__version__ = '1.1.11'
__version__ = '1.1.12'
__date__ = '2017-08-11'
......@@ -36,5 +36,5 @@
__date__ = '2017-08-11'
__updated__ = '2019-01-29'
__updated__ = '2019-06-17'
def which(program):
......@@ -72,6 +72,6 @@
'/mnt'])
def isort():
def isort(docker_client):
"""Run isort
"""
......@@ -76,5 +76,7 @@
"""Run isort
"""
_logger.info('Pulling isort')
docker_client.pull(repository='xcgd/isort', tag='odoo')
_logger.info('Running isort')
call([
'docker', 'run', '--rm', '--volume',
......@@ -78,8 +80,8 @@
_logger.info('Running isort')
call([
'docker', 'run', '--rm', '--volume',
'{}:/mnt'.format(os.environ['PWD']), 'xcgd/isort:odoo',
'sh', '-c', 'cd /mnt && isort -c'])
'{}:/mnt'.format(os.environ['PWD']), '-w', '/mnt', 'xcgd/isort:odoo',
'isort', '-c'])
def main(argv=None): # IGNORE:C0111
......@@ -647,7 +649,7 @@
flake8(odoo_type)
if run_isort:
isort()
isort(docker_client)
if dev:
if odoo_type in ('odoo11', 'odoo10'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment