File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -191,13 +191,17 @@ pseudoxml:
191191GITREPOPATH = $(CURDIR ) /.git
192192SOURCEBRANCH = $(shell git symbolic-ref --short HEAD)
193193PUBLISHBRANCH = master
194+ PUBFIRSTREMOTE = $(shell git branch -r --list "* /$(PUBLISHBRANCH ) " | head -1)
194195GITREMOTE = $(shell git config --get branch.$(PUBLISHBRANCH ) .remote)
195196GITREMOTEURL = $(shell git config --get remote.$(GITREMOTE ) .url)
196197GITLASTCOMMIT = $(shell git rev-parse --short HEAD)
197198
198199.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 )
201205
202206publish-prepare : .create-publish-branch
203207 @test -d $(BUILDDIR ) /html || \
You can’t perform that action at this time.
0 commit comments