Skip to content

Commit 569a99a

Browse files
committed
add fromGitRepo in component model
1 parent 4b0df96 commit 569a99a

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

templates/component.ros2.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{{ model.name }}:
2+
{% if model.fromGitRepo != none %}
3+
fromGitRepo: '{{ model.fromGitRepo }}'
4+
{% endif %}
25
artifacts:
36
{% for artifact in model.artifact %}
47
{{ artifact.name }}:

test/outputs/test_model.ros2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
test_model:
2+
fromGitRepo: 'git_url'
23
artifacts:
34
map_server:
45
node: /map_server

test/unittest/test_generate_component.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
test_model = Package(
88
name="test_model",
9+
fromGitRepo="git_url",
910
artifact=[
1011
Artifact(
1112
name="map_server",
@@ -48,6 +49,7 @@
4849

4950
expect_result = """
5051
test_model:
52+
fromGitRepo: 'git_url'
5153
artifacts:
5254
map_server:
5355
node: /map_server

0 commit comments

Comments
 (0)