Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Drupal
drupalizer
Commits
c6b7e1c3
Commit
c6b7e1c3
authored
Mar 25, 2016
by
Emmanuel Milou
Browse files
Add documentation generation task
parent
9dd3970a
Changes
2
Hide whitespace changes
Inline
Side-by-side
__init__.py
View file @
c6b7e1c3
...
...
@@ -70,3 +70,4 @@ def release():
"""
execute
(
drush
.
archive_dump
)
execute
(
drush
.
gen_doc
)
drush.py
View file @
c6b7e1c3
...
...
@@ -24,6 +24,8 @@ from fabric.colors import red, green
# Import datetime
from
datetime
import
datetime
import
os.path
import
helpers
as
h
@
task
(
alias
=
'make'
)
...
...
@@ -147,4 +149,19 @@ def archive_dump(role='docker'):
'drush archive-dump --destination={}/{} --tar-options="--exclude=.git"'
.
format
(
env
.
builddir
,
platform
)
)
@
task
@
roles
(
'local'
)
def
gen_doc
(
role
=
'local'
):
"""
Generate README file
:param role Default 'role' where to run the task
"""
if
os
.
path
.
isfile
(
'{}/README.adoc'
.
format
(
env
.
workspace
)):
h
.
fab_run
(
role
,
'asciidoctor -b html5 -o {}/README.html {}/README.adoc'
.
format
(
env
.
workspace
,
env
.
workspace
))
print
(
green
(
'README.html generated in {}'
.
format
(
env
.
workspace
)))
if
os
.
path
.
isfile
(
'{}/CHANGELOG.adoc'
.
format
(
env
.
workspace
)):
h
.
fab_run
(
role
,
'asciidoctor -b html5 -o {}/CHANGELOG.html {}/CHANGELOG.adoc'
.
format
(
env
.
workspace
,
env
.
workspace
))
print
(
green
(
'CHANGELOG.html generated in {}'
.
format
(
env
.
workspace
)))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment