diff options
Diffstat (limited to 'src/GitRepo.js')
-rw-r--r-- | src/GitRepo.js | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/GitRepo.js b/src/GitRepo.js index 57858aa..d7e19a7 100644 --- a/src/GitRepo.js +++ b/src/GitRepo.js @@ -1,5 +1,15 @@ -function repoVersion() { - console.log("testing"); - return "0.0.0"; +var Process = loadExtension("qbs.Process") + +function read(workingDirectory) { + var git = new Process(); + git.setWorkingDirectory(workingDirectory); + + var meta = Object.create(null); + git.exec("git", ["describe", "--abbrev=0", "--tag"], true); + meta.version = git.readLine(); + + git.exec("git", ["describe", "--tag"], true); + meta.describe = git.readLine(); + + return meta; } - |