]> rtime.felk.cvut.cz Git - pes-rpp/rpp-simulink.git/commitdiff
Makefile: Don't fail in commit-lib-update
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 19 Aug 2015 10:21:24 +0000 (12:21 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 19 Aug 2015 10:22:00 +0000 (12:22 +0200)
When there is nothing to commit in test-sw, continue by commiting in
this repo.

Makefile

index acd9c5bf1628b4c134381290f46436e0ad703a47..f0b90f428985a69d804f10aab99a0d3b1e1351d2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,10 @@ release4us:
 .PHONY: commit-lib-update
 commit-lib-update:
        test $$($(TESTSW_LIB_COMMIT)) = $$($(SIMULINK_LIB_COMMIT))
-       git --git-dir=doc/test-sw/.git commit -m "Update lib submodule" rpp-lib
+       if git --git-dir=doc/test-sw/.git diff-index --quiet HEAD -- rpp-lib; \
+       then echo "Nothing to commit in test-sw"; \
+       else git --git-dir=doc/test-sw/.git commit -m "Update lib submodule" rpp-lib; \
+       fi
        git commit  -m "Update lib submodule" doc/test-sw rpp/lib
 
 TESTSW_LIB_COMMIT = git --git-dir=doc/test-sw/rpp-lib/.git rev-parse HEAD