Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Make Pantheon behave as a submodule #419

Merged
merged 2 commits into from
Dec 14, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ def calculateVersion() {

def getCheckedOutGitCommitHash() {
def gitFolder = "$projectDir/.git/"
if (!file(gitFolder).isDirectory()) {
// we may be in a submodule
gitFolder = file(gitFolder).text.substring(8).trim() + "/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth adding an explanatory comment here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}
def takeFromHash = 8
/*
* '.git/HEAD' contains either
Expand Down