Skip to content

Commit

Permalink
Normalize generated file on pre- or post-commit re-runs
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Sep 19, 2024
1 parent c3a7a67 commit bfb94f3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion var/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,17 @@ clean:
facet_cardinalities.ttl: \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/src/facet_cardinalities_ttl.py
rm -f __$@ _$@
source $(top_srcdir)/venv/bin/activate \
&& python3 $(top_srcdir)/src/facet_cardinalities_ttl.py \
_$@
__$@
# Normalize if normalizing jar has already been downloaded from pre-commit.
test ! -r $(top_srcdir)/rdf-toolkit.jar \
|| java -jar $(top_srcdir)/rdf-toolkit.jar \
--inline-blank-nodes \
--source __$@ \
--source-format turtle \
--target _$@ \
--target-format turtle
if [ -r _$@ ]; then rm __$@ ; else mv __$@ _$@ ; fi
mv _$@ $@

0 comments on commit bfb94f3

Please sign in to comment.