Make Pantheon behave as a submodule (#419)

* version sniffing should be submodule aware
Danno Ferrin 6 years ago committed by GitHub
parent f99457bb3c
commit 4d1429cf72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      build.gradle

@ -411,6 +411,11 @@ def calculateVersion() {
def getCheckedOutGitCommitHash() {
def gitFolder = "$projectDir/.git/"
if (!file(gitFolder).isDirectory()) {
// We are in a submodule. The file's contents are `gitdir: <gitFolder>\n`.
// Read the file, cut off the front, and trim the whitespace.
gitFolder = file(gitFolder).text.substring(8).trim() + "/"
}
def takeFromHash = 8
/*
* '.git/HEAD' contains either

Loading…
Cancel
Save