Skip to content

Commit

Permalink
Fix component version when download from source (#931)
Browse files Browse the repository at this point in the history
* add annotation to component downloaded

* change input file in the robot command

* copy file to intermediate file to compare later

* split else block into multiple lines

---------

Co-authored-by: Anita Caron <anitacaron@users.noreply.github.com>
  • Loading branch information
Anita Caron and anitacaron authored Jan 4, 2024
1 parent 54e329f commit 252399d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions template/src/ontology/Makefile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,11 @@ component-download-{{ component.filename }}: | $(TMPDIR)
remove {% if component.base_iris is not none %}{% for iri in component.base_iris %}--base-iri {{iri}} {% endfor %}{% else %}--base-iri $(OBOBASE)/{{ project.id.upper() }} {% endif %}--axioms external --preserve-structure false --trim false \{% endif %}
annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) -o $(TMPDIR)/$@.owl; fi

$(COMPONENTSDIR)/{{ component.filename }}: component-download-{{ component.filename }}
if [ $(COMP) = true ] ; then if cmp -s $(TMPDIR)/component-download-{{ component.filename }}.owl $@ ; then echo "Component identical."; else echo "Component is different, updating." && cp $(TMPDIR)/component-download-{{ component.filename }}.owl $@; fi; fi
$(COMPONENTSDIR)/{{ component.filename }}: component-download-{{ component.filename }}
if [ $(COMP) = true ]; then if cmp -s $(TMPDIR)/component-download-{{ component.filename }}.owl $(TMPDIR)/component-download-{{ component.filename }}.tmp.owl ; then echo "Component identical."; \
else echo "Component is different, updating." &&\
cp $(TMPDIR)/component-download-{{ component.filename }}.owl $(TMPDIR)/component-download-{{ component.filename }}.tmp.owl &&\
$(ROBOT) annotate -i $(TMPDIR)/component-download-{{ component.filename }}.owl --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) -o $@; fi; fi

.PRECIOUS: $(COMPONENTSDIR)/{{ component.filename }}
{% elif component.use_template %}
Expand Down

0 comments on commit 252399d

Please sign in to comment.