aboutsummaryrefslogtreecommitdiff
path: root/src/GitRepo.js
blob: d7e19a728af6b929647ab7dcfe5a51e5951ef501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;
}