-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathGitProbe.qbs
More file actions
26 lines (20 loc) · 657 Bytes
/
GitProbe.qbs
File metadata and controls
26 lines (20 loc) · 657 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import qbs
import qbs.File
import "BuildHelpers.js" as Funcs
Probe {
// Input
property string sourceDirectory
// Output
property string hash
property string tag
property string commitdate
property var hack: File.lastModified(sourceDirectory + "/../.git/logs/HEAD") //A bit of a hack to make qbs re-resolve (see QBS-996)
configure: {
hash = Funcs.gitHash(sourceDirectory)
console.error("git hash:" + hash)
tag = Funcs.gitTag(sourceDirectory)
console.error("git tag:" + tag)
commitdate = Funcs.gitDate(sourceDirectory, hash)
console.error("git date:" + commitdate)
}
}