util: Fix versioning when gitdir is absent (#809)

The gitdir previously could be absent and produce a version of "" in
spite of checks for it. Fixed.

Parent directories with shlex-interpreted characters in their names
could be misinterpreted. Removed shlex parsing.

Packagers may want to remove the git history to slim down the package
size, so add an option for using a file 'version' in the klippy
directory to set version without using git.

Signed-Off-By: Lucas Fink <software@lfcode.ca>
This commit is contained in:
lf
2018-10-27 08:44:38 -06:00
committed by KevinOConnor
parent f57c29442c
commit a33792f07e
4 changed files with 88 additions and 12 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@ out
*.pyc
.config
.config.old
klippy/.version