Makefile: use `git rev-parse HEAD` instead of crazy `git show` commands
authorJean Privat <jean@pryen.org>
Wed, 6 Nov 2013 15:47:55 +0000 (10:47 -0500)
committerJean Privat <jean@pryen.org>
Wed, 6 Nov 2013 15:47:55 +0000 (10:47 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

Makefile

index 068fa2f..ee8c64d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,7 @@ doc/stdlib/index.html: bin/nitdoc
                --custom-menu-items "<li><a href=\"http://nitlanguage.org/\">Nitlanguage.org</a></li>" \
                --custom-overview-text "<p>Documentation for the standard library of Nit<br/>Version $$(git describe)<br/>Date: $$(git show --format="%cd" | head -1)</p>" \
                --custom-footer-text "Nit standard library. Version $$(git describe)." \
-               --source "https://github.com/privat/nit/blob/$$(git show --format="%H" | head -1)/%f#L%l-%L"
+               --source "https://github.com/privat/nit/blob/$$(git rev-parse HEAD)/%f#L%l-%L"
 
 doc/nitc/index.html: bin/nitdoc
        bin/nitdoc src/nitc.nit src/nitdoc.nit src/nits.nit -d doc/nitc \
@@ -44,7 +44,7 @@ doc/nitc/index.html: bin/nitdoc
                --custom-menu-items "<li><a href=\"http://nitlanguage.org/\">Nitlanguage.org</a></li>" \
                --custom-overview-text "<p>Documentation for the Nit compiler and tools<br/>Version $$(git describe)<br/>Date: $$(git show --format="%cd" | head -1)</p>" \
                --custom-footer-text "Nit compiler. Version $$(git describe)." \
-               --source "https://github.com/privat/nit/blob/$$(git show --format="%H" | head -1)/%f#L%l-%L"
+               --source "https://github.com/privat/nit/blob/$$(git rev-parse HEAD)/%f#L%l-%L"
 
 doc/newmodel/index.html: bin/nitdoc
        bin/nitdoc src/nit.nit src/nitmetrics.nit src/nitg.nit src/nitx.nit src/nitunit.nit src/nitlight.nit src/dbgcli.nit src/netdbg.nit -d doc/newmodel \
@@ -53,9 +53,9 @@ doc/newmodel/index.html: bin/nitdoc
                --custom-overview-text "<p>Documentation for the Nit tools based on the new metamodel<br/>Version $$(git describe)<br/>Date: $$(git show --format="%cd" | head -1)</p>" \
                --custom-footer-text "Nit new metamodel. Version $$(git describe)." \
                --github-upstream "privat:nit:master" \
-               --github-base-sha1 "$$(git show | head -1 | cut -c8-)" \
+               --github-base-sha1 "$$(git rev-parse HEAD)" \
                --github-gitdir "." \
-               --source "https://github.com/privat/nit/blob/$$(git show --format="%H" | head -1)/%f#L%l-%L"
+               --source "https://github.com/privat/nit/blob/$$(git rev-parse HEAD)/%f#L%l-%L"
 
 clean:
        rm -rf -- .nit_compile 2> /dev/null || true