File tree 2 files changed +3
-3
lines changed
main/java/pl/allegro/tech/build/axion/release/infrastructure/git
test/groovy/pl/allegro/tech/build/axion/release/infrastructure/git
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -387,7 +387,7 @@ private String branchNameFromGit() {
387
387
.map (Repository ::shortenRefName )
388
388
.orElse (null );
389
389
390
- if ("HEAD" . equals ( branchName ) && properties .getOverriddenBranchName () != null && !properties .getOverriddenBranchName ().isEmpty ()) {
390
+ if (properties .getOverriddenBranchName () != null && !properties .getOverriddenBranchName ().isEmpty ()) {
391
391
branchName = Repository .shortenRefName (properties .getOverriddenBranchName ());
392
392
}
393
393
return branchName ;
Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ class GitRepositoryTest extends Specification {
367
367
position. branch == ' feature/overridden-branch-name'
368
368
}
369
369
370
- def " should ignore overriddenBranchName when not in detached state" () {
370
+ def " should not ignore overriddenBranchName when not in detached state" () {
371
371
given :
372
372
File repositoryDir = File . createTempDir(' axion-release' , ' tmp' )
373
373
def scmProperties = scmProperties(repositoryDir)
@@ -384,7 +384,7 @@ class GitRepositoryTest extends Specification {
384
384
ScmPosition position = repository. currentPosition()
385
385
386
386
then :
387
- position. branch == ' some -branch'
387
+ position. branch == ' feature/overridden -branch-name '
388
388
}
389
389
390
390
def " should push changes and tag to remote" () {
You can’t perform that action at this time.
0 commit comments