Commit 9bdd32df authored by Ernesto Rodriguez Ortiz's avatar Ernesto Rodriguez Ortiz
Browse files

Use helper fab_exists instead of os.path.isfile.

The use of os.path.isfile will work if we are in the local environement but will
not work if we need to know if the file exist in a remote environement. fab_exists will
use the correct way to findout if the file exists using the role env variable.
parent 174f3ef4
......@@ -165,12 +165,12 @@ def gen_doc(role='docker'):
:param role Default 'role' where to run the task
if os.path.isfile('{}/README.adoc'.format(env.docker_workspace)):
if h.fab_exists(role, '{}/README.adoc'.format(env.docker_workspace)):
h.fab_run(role, 'asciidoctor -b html5 -o {}/README.html {}/README.adoc'.format(env.docker_workspace,
print(green('README.html generated in {}'.format(env.docker_workspace)))
if os.path.isfile('{}/CHANGELOG.adoc'.format(env.docker_workspace)):
if h.fab_exists(role, '{}/CHANGELOG.adoc'.format(env.docker_workspace)):
h.fab_run(role, 'asciidoctor -b html5 -o {}/CHANGELOG.html {}/CHANGELOG.adoc'.format(env.docker_workspace,
print(green('CHANGELOG.html generated in {}'.format(env.docker_workspace)))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment