]> granicus.if.org Git - icinga2/commitdiff
Debian: only update icinga-version.h.fallback when in a GIT repo.
authorMarkus Frosch <markus@lazyfrosch.de>
Wed, 11 Dec 2013 12:22:00 +0000 (13:22 +0100)
committerMarkus Frosch <markus@lazyfrosch.de>
Wed, 11 Dec 2013 12:23:29 +0000 (13:23 +0100)
This avoids the version coming out as GIT-UNKNOWN after chroot builds.

Fixes #5294

debian/rules

index c32e8296344e9316a90ff3f46be205d753c99aaf..ca12369a5f19ea914d61e4edd97377e499e7fd0b 100755 (executable)
@@ -6,12 +6,14 @@ export DH_VERBOSE=1
        dh $@
 
 override_dh_auto_clean:
+ifeq ($(shell test -d .git && echo "git"),git) # verify we are in a GIT repo
        # ensure icinga-version.h.fallback to be present
        rm -rf debian-prebuild/
        mkdir debian-prebuild
        cd debian-prebuild/ && cmake ../debian/
        cp debian-prebuild/icinga-version.h.fallback .
        rm -rf debian-prebuild/
+endif
        # now clean build dir
        dh_auto_clean
        rm -f config.log