Make Pantheon behave as a submodule (#419)

* version sniffing should be submodule aware

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Danno Ferrin 6 years ago committed by GitHub
parent c7e10ce8c8
commit b6e53208ec
  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