Skip to content

Commit

Permalink
add fromGitRepo in component model
Browse files Browse the repository at this point in the history
  • Loading branch information
ipa-rwu committed Feb 27, 2024
1 parent 4b0df96 commit 569a99a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/component.ros2.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{{ model.name }}:
{% if model.fromGitRepo != none %}
fromGitRepo: '{{ model.fromGitRepo }}'
{% endif %}
artifacts:
{% for artifact in model.artifact %}
{{ artifact.name }}:
Expand Down
1 change: 1 addition & 0 deletions test/outputs/test_model.ros2
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_model:
fromGitRepo: 'git_url'
artifacts:
map_server:
node: /map_server
Expand Down
2 changes: 2 additions & 0 deletions test/unittest/test_generate_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

test_model = Package(
name="test_model",
fromGitRepo="git_url",
artifact=[
Artifact(
name="map_server",
Expand Down Expand Up @@ -48,6 +49,7 @@

expect_result = """
test_model:
fromGitRepo: 'git_url'
artifacts:
map_server:
node: /map_server
Expand Down

0 comments on commit 569a99a

Please sign in to comment.