Skip to content

Commit 4cf1342

Browse files
committed
BUG-029: Run commands in the rst_to_html role directly to build examples.
1 parent 4435165 commit 4cf1342

File tree

8 files changed

+57
-5
lines changed

8 files changed

+57
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
dependencies:
33
- { role: fidimag }
4-
- { role: rst_to_html, BUILD_DIR: "{{ EXAMPLES_DOC_FOLDER }}", SOURCE_PATH: "{{ EXAMPLES_RST_FILE }}", BUILD_NAME: "{{ EXAMPLES_OUTPUT_NAME }}" }
4+
- { role: rst_to_html }

roles/fidimag_examples/tasks/main.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@
22
# This Ansible role prepares Fidimag examples and places some documentation on
33
# the Desktop.
44

5+
# Create examples documentation.
6+
- name: Create documentation build directory.
7+
file:
8+
name={{ EXAMPLES_DOC_FOLDER }}
9+
state=directory
10+
sudo: yes
11+
12+
- name: Convert to HTML and place in the build directory.
13+
shell: rst2html.py {{ EXAMPLES_RST_FILE }} {{ EXAMPLES_OUTPUT_NAME }}
14+
chdir={{ EXAMPLES_DOC_FOLDER }}
15+
creates={{ EXAMPLES_DOC_FOLDER }}/{{ EXAMPLES_OUTPUT_NAME }}
16+
sudo: yes
17+
518
# This task is not very robust, but I can't think of a better way of doing
619
# this.
7-
820
- name: Copy fidimag examples to a more accessible location.
921
command: cp -r /opt/fidimag/examples {{ FIDIMAG_EXAMPLES_FOLDER }}
1022
creates={{ FIDIMAG_EXAMPLES_FOLDER }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
dependencies:
33
- { role: magpar }
4-
- { role: rst_to_html, BUILD_DIR: "{{ EXAMPLES_DOC_FOLDER }}", SOURCE_PATH: "{{ EXAMPLES_RST_FILE }}", BUILD_NAME: "{{ EXAMPLES_OUTPUT_NAME }}" }
4+
- { role: rst_to_html }

roles/magpar_examples/tasks/main.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22
# This Ansible role prepares Magpar examples and places some documentation on
33
# the Desktop.
44

5+
# Create examples documentation.
6+
- name: Create documentation build directory.
7+
file:
8+
name={{ EXAMPLES_DOC_FOLDER }}
9+
state=directory
10+
sudo: yes
11+
12+
- name: Convert to HTML and place in the build directory.
13+
shell: rst2html.py {{ EXAMPLES_RST_FILE }} {{ EXAMPLES_OUTPUT_NAME }}
14+
chdir={{ EXAMPLES_DOC_FOLDER }}
15+
creates={{ EXAMPLES_DOC_FOLDER }}/{{ EXAMPLES_OUTPUT_NAME }}
16+
sudo: yes
17+
18+
# Install examples
519
- name: Download magpar examples tarball.
620
get_url:
721
url={{ MAGPAR_EXAMPLES_URL }}

roles/nmag_examples/meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
dependencies:
33
- { role: nmag }
4-
- { role: rst_to_html, BUILD_DIR: "{{ EXAMPLES_DOC_FOLDER }}", SOURCE_PATH: "{{ EXAMPLES_RST_FILE }}", BUILD_NAME: "{{ EXAMPLES_OUTPUT_NAME }}" }
4+
- { role: rst_to_html }

roles/nmag_examples/tasks/main.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22
# This Ansible role prepares Nmag examples and places some documentation on the
33
# Desktop.
44

5+
# Create examples documentation.
6+
- name: Create documentation build directory.
7+
file:
8+
name={{ EXAMPLES_DOC_FOLDER }}
9+
state=directory
10+
sudo: yes
11+
12+
- name: Convert to HTML and place in the build directory.
13+
shell: rst2html.py {{ EXAMPLES_RST_FILE }} {{ EXAMPLES_OUTPUT_NAME }}
14+
chdir={{ EXAMPLES_DOC_FOLDER }}
15+
creates={{ EXAMPLES_DOC_FOLDER }}/{{ EXAMPLES_OUTPUT_NAME }}
16+
sudo: yes
17+
518
# This following task is not very robust, but I can't think of a better way of
619
# doing this.
720
- name: Copy nmag examples to a more accessible location.

roles/oommf_examples/meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
dependencies:
33
- { role: oommf }
4-
- { role: rst_to_html, BUILD_DIR: "{{ EXAMPLES_DOC_FOLDER }}", SOURCE_PATH: "{{ EXAMPLES_RST_FILE }}", BUILD_NAME: "{{ EXAMPLES_OUTPUT_NAME }}" }
4+
- { role: rst_to_html }

roles/oommf_examples/tasks/main.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22
# This Ansible role prepares OOMMF examples and places some documentation on
33
# the Desktop.
44

5+
# Create examples documentation.
6+
- name: Create documentation build directory.
7+
file:
8+
name={{ EXAMPLES_DOC_FOLDER }}
9+
state=directory
10+
sudo: yes
11+
12+
- name: Convert to HTML and place in the build directory.
13+
shell: rst2html.py {{ EXAMPLES_RST_FILE }} {{ EXAMPLES_OUTPUT_NAME }}
14+
chdir={{ EXAMPLES_DOC_FOLDER }}
15+
creates={{ EXAMPLES_DOC_FOLDER }}/{{ EXAMPLES_OUTPUT_NAME }}
16+
sudo: yes
17+
518
# This task is not very robust, but I can't think of a better way of doing
619
# this.
720
- name: Copy oommf examples to a more accessible location.

0 commit comments

Comments
 (0)