File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -191,13 +191,17 @@ pseudoxml:
191
191
GITREPOPATH = $(CURDIR ) /.git
192
192
SOURCEBRANCH = $(shell git symbolic-ref --short HEAD)
193
193
PUBLISHBRANCH = master
194
+ PUBFIRSTREMOTE = $(shell git branch -r --list "* /$(PUBLISHBRANCH ) " | head -1)
194
195
GITREMOTE = $(shell git config --get branch.$(PUBLISHBRANCH ) .remote)
195
196
GITREMOTEURL = $(shell git config --get remote.$(GITREMOTE ) .url)
196
197
GITLASTCOMMIT = $(shell git rev-parse --short HEAD)
197
198
198
199
.create-publish-branch :
199
- git rev-parse --verify --quiet $(PUBLISHBRANCH ) > /dev/null || \
200
- git branch --track $(PUBLISHBRANCH ) origin/$(PUBLISHBRANCH )
200
+ @git rev-parse --verify --quiet $(PUBLISHBRANCH ) > /dev/null || \
201
+ echo $(PUBFIRSTREMOTE ) | grep -q . || \
202
+ ( echo " No remote found for branch $( PUBLISHBRANCH) " >&2 ; exit 1 )
203
+ git rev-parse --verify --quiet $(PUBLISHBRANCH ) > /dev/null || \
204
+ git branch --track $(PUBLISHBRANCH ) $(PUBFIRSTREMOTE )
201
205
202
206
publish-prepare : .create-publish-branch
203
207
@test -d $(BUILDDIR ) /html || \
You can’t perform that action at this time.
0 commit comments