Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
git-commit-id#326: The runningOnBuildServer check for detecting the b…
Browse files Browse the repository at this point in the history
…ranch name on Jenkins / Hudson now checks 'HUDSON_HOME' and 'JENKINS_HOME'
  • Loading branch information
TheSnoozer committed Sep 23, 2017
1 parent e0f5d6d commit deec4d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/pl/project13/maven/git/GitDataProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ protected String determineBranchName(Map<String, String> env) throws GitCommitId
* @param env environment settings
*/
private boolean runningOnBuildServer(Map<String, String> env) {
return env.containsKey("HUDSON_URL") || env.containsKey("JENKINS_URL");
return env.containsKey("HUDSON_URL") || env.containsKey("JENKINS_URL") ||
env.containsKey("HUDSON_HOME") || env.containsKey("JENKINS_HOME");
}

/**
Expand Down Expand Up @@ -261,4 +262,4 @@ protected static String stripCredentialsFromOriginUrl(String gitRemoteString) th
throw new GitCommitIdExecutionException(e);
}
}
}
}

0 comments on commit deec4d1

Please sign in to comment.