Skip to content

Commit f071de8

Browse files
author
Martin Jackson
committed
Enhance compatibility with older versions of git
1 parent cbee5dc commit f071de8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ BOOTSTRAP=1
22
SECRETS=~/values-secret.yaml
33
NAME=$(shell basename `pwd`)
44
TARGET_REPO=$(shell git remote show origin | grep Push | sed -e 's/.*URL://' -e 's%:[a-z].*@%@%' -e 's%:%/%' -e 's%git@%https://%' )
5-
TARGET_BRANCH=$(shell git branch --show-current)
5+
# git branch --show-current is also available as of git 2.22, but we will use this for compatibility
6+
TARGET_BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
67

78
# Makefiles that use this target must provide:
89
# PATTERN: The name of the pattern that is using it. This will be used programmatically for the source namespace

0 commit comments

Comments
 (0)