blob: 2e9a2ae42c1ede224add3211db525b456a23c2fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import qbs.File
import qbs.FileInfo
import qbs.TextFile
Module {
Probe {
id: qbsVersionProbe
property var lastModified: File.lastModified(versionFilePath)
property string versionFilePath: FileInfo.joinPaths(path, "..", "..", "..", "VERSION")
property string version
configure: {
var tf = new TextFile(versionFilePath, TextFile.ReadOnly);
try {
version = tf.readAll().trim();
found = !!version;
} finally {
tf.close();
}
}
}
version: qbsVersionProbe.version
}
|