mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-29 23:40:00 +00:00
Fixed VolmLib commit stamp
- The VolmLib stamp records a commit only when the checkout is its own Git repository - A VolmLib copy inside another repository stamps an unknown commit
This commit is contained in:
1 parent
0d76d81dab
commit
b6e9f8a14d
1 file changed
+3
-1
@@ -120,7 +120,9 @@ if (irisLocalVolmLibDirectory == null) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
String commit = irisGit(irisLocalVolmLibDirectory, 'rev-parse', 'HEAD')
|
||||
String root = irisGit(irisLocalVolmLibDirectory, 'rev-parse', '--show-toplevel')
|
||||
boolean ownRepository = root != null && new File(root).canonicalPath == irisLocalVolmLibDirectory.canonicalPath
|
||||
String commit = ownRepository ? irisGit(irisLocalVolmLibDirectory, 'rev-parse', 'HEAD') : null
|
||||
String status = commit == null ? null : irisGit(irisLocalVolmLibDirectory, '--no-optional-locks', 'status', '--porcelain')
|
||||
String dirty = status == null ? 'unknown' : String.valueOf(!status.isEmpty())
|
||||
irisVolmLibStamp = [source: 'local', commit: commit ?: 'unknown', dirty: dirty]
|
||||
|
||||
Reference in new issue
Block a user