diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-02-17 17:11:33 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-02-17 17:11:33 +0100 |
commit | a8a168ec6ccfa3a8ec4243ebf0ccaaf86a13b2a2 (patch) | |
tree | 9f1d9c4a79816a7e9003935362ca79d19304c5c6 /qbs/GitRepo.js | |
parent | Added deprecated API warnings (diff) | |
download | smolbote-a8a168ec6ccfa3a8ec4243ebf0ccaaf86a13b2a2.tar.xz |
Moved smolbote.qbs
Diffstat (limited to 'qbs/GitRepo.js')
-rw-r--r-- | qbs/GitRepo.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/qbs/GitRepo.js b/qbs/GitRepo.js new file mode 100644 index 0000000..d7e19a7 --- /dev/null +++ b/qbs/GitRepo.js @@ -0,0 +1,15 @@ +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; +} |