build: Enable detailed version information when built from shallow clone or tarball

Change-Id: Ia2ec086dff822989ba54117678a41394e990f996
Refs: #1915
diff --git a/.gitignore b/.gitignore
index fc3231c..10263e6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,4 +11,7 @@
 build/
 
 # Compiled python code
-**/*.pyc
+*.pyc
+
+# Other
+VERSION