Skip to content

Commit

Permalink
Fix GIT_DIR not always specific enough
Browse files Browse the repository at this point in the history
  • Loading branch information
sagebind committed Jun 28, 2018
1 parent ba30098 commit ff558ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = 'com.widen.oss'
version = '0.3.0'
version = '0.3.1'

sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/widen/versioning/VersionGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static String gitDescribe(Settings settings, File projectDir) {
.redirectOutput(ProcessBuilder.Redirect.PIPE)
.redirectError(ProcessBuilder.Redirect.INHERIT)
.directory(projectDir);
processBuilder.environment().put("GIT_DIR", projectDir.getPath());
processBuilder.environment().put("GIT_DIR", projectDir.getPath() + "/.git");

Process process = processBuilder.start();
String output = IOUtils.toString(process.getInputStream(), Charset.forName("UTF-8"));
Expand Down

0 comments on commit ff558ec

Please sign in to comment.