File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
main/java/pl/project13/maven/git
test/java/pl/project13/maven/git Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -73,9 +73,15 @@ protected String getBranchName() throws IOException {
73
73
}
74
74
75
75
private String getBranch (File canonical ) {
76
- String branch = tryToRunGitCommand (canonical , "symbolic-ref HEAD" );
77
- if (branch != null ) {
78
- branch = branch .replace ("refs/heads/" , "" );
76
+ String branch = null ;
77
+ try {
78
+ branch = tryToRunGitCommand (canonical , "symbolic-ref HEAD" );
79
+ if (branch != null ) {
80
+ branch = branch .replace ("refs/heads/" , "" );
81
+ }
82
+ }catch (RuntimeException e ){
83
+ // it seems that git repro is in 'DETACHED HEAD'-State, using Commid-Id as Branch
84
+ branch = getCommitId ();
79
85
}
80
86
return branch ;
81
87
}
Original file line number Diff line number Diff line change @@ -621,11 +621,6 @@ public void shouldExtractTagsOnGivenCommit(boolean useNativeGit) throws Exceptio
621
621
@ Test
622
622
@ Parameters (method = "useNativeGit" )
623
623
public void runGitDescribeWithMatchOption (boolean useNativeGit ) throws Exception {
624
- if (System .getenv ().get ("TRAVIS" ).equals ("true" ) && System .getenv ().get ("CI" ).equals ("true" )) {
625
- // FIXME: this test has trouble on travis, I think it's because of not pulling everything?
626
- return ;
627
- }
628
-
629
624
// given
630
625
mavenSandbox .withParentProject ("my-pom-project" , "pom" )
631
626
.withChildProject ("my-jar-module" , "jar" )
You can’t perform that action at this time.
0 commit comments