Skip to content

Commit

Permalink
Pcre regex not supported on OSX (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
osterman authored Mar 27, 2018
1 parent 636215c commit 23eb6ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions modules/git/bootstrap.Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
GIT:= $(shell which git)

export GIT_COMMIT ?= $(shell $(GIT) rev-parse --verify HEAD)
export GIT_COMMIT_SHORT ?= $(shell $(GIT) rev-parse --verify --short HEAD)
export GIT_BRANCH ?= $(shell $(GIT) branch | grep \* | cut -d ' ' -f2 | grep -Ev "^\W" )

export GIT_COMMIT_SHORT ?= $(shell $(GIT) rev-parse --verify --short HEAD)
export GIT_BRANCH ?= $(shell $(GIT) rev-parse --abbrev-ref HEAD)
export GIT_LATEST_TAG ?= $(shell $(GIT) describe --tags --abbrev=0 2>/dev/null)

ifeq ($(GIT_LATEST_TAG),)
Expand All @@ -16,7 +15,6 @@ else
export GIT_IS_BRANCH := 1
endif


ifeq ($(shell $(GIT) describe --exact-match --tags 2>/dev/null),)
export GIT_IS_TAG := 0
else
Expand Down
2 changes: 1 addition & 1 deletion modules/git/template/module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function git-template-prepare-data {
cat << EOF > $GIT_FILE
---
url: $(git ls-remote --get-url)
name: $(git ls-remote --get-url | grep -oP "(?<=\/).*(?=.git)")
name: $(basename `git ls-remote --get-url` .git)
commit: ${GIT_COMMIT}
commit_short: ${GIT_COMMIT_SHORT}
branch: ${GIT_BRANCH}
Expand Down
4 changes: 2 additions & 2 deletions modules/stages/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ ifeq ($(GIT_IS_TAG),1)
endif

ifeq ($(GIT_IS_BRANCH),1)
ifneq ($(shell echo $(GIT_BRANCH) | grep -Po $(FEATURE_PATTERN)),)
FEATURE ?= $(shell echo $(GIT_BRANCH) | grep -Po $(FEATURE_PATTERN))
ifneq ($(shell echo $(GIT_BRANCH) | grep -Eo $(FEATURE_PATTERN)),)
FEATURE ?= $(shell echo $(GIT_BRANCH) | grep -Eo $(FEATURE_PATTERN))
else
FEATURE ?= "$(GIT_BRANCH)"
endif
Expand Down

0 comments on commit 23eb6ae

Please sign in to comment.