From 3149525c2bb845b5440c9749acded484d009e6ac Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 23 Mar 2017 13:30:29 +0100 Subject: Rewrote the pre-commit hook into Ruby --- tools/qbs/GitRepo.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tools/qbs/GitRepo.js (limited to 'tools/qbs') diff --git a/tools/qbs/GitRepo.js b/tools/qbs/GitRepo.js new file mode 100644 index 0000000..d7e19a7 --- /dev/null +++ b/tools/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; +} -- cgit v1.2.1