Update Makefile
This commit is contained in:
@@ -17,7 +17,7 @@ branchname := $(shell git branch --show-current)
|
|||||||
reponame := $(shell basename $(shell git rev-parse --show-toplevel))
|
reponame := $(shell basename $(shell git rev-parse --show-toplevel))
|
||||||
projtype := $(shell basename $(shell dirname $(shell git rev-parse --show-toplevel)))
|
projtype := $(shell basename $(shell dirname $(shell git rev-parse --show-toplevel)))
|
||||||
pubtype := $(if $(findstring PUB,$(branchname)),public,protected)
|
pubtype := $(if $(findstring PUB,$(branchname)),public,protected)
|
||||||
remotedir := drwater.net:/home/www/drc/$(projtype)/$(pubtype)/$(reponame)/$(branchname)
|
remotedir := dwuser@drwater.net:/home/www/drc/$(projtype)/$(pubtype)/$(reponame)/$(branchname)
|
||||||
outputdir := $(shell awk -F': *' '/^ *output-dir:/ {print $$2 "/" }' ./_quarto.yml)
|
outputdir := $(shell awk -F': *' '/^ *output-dir:/ {print $$2 "/" }' ./_quarto.yml)
|
||||||
siteurl := https://drc.drwater.net/$(projtype)/$(pubtype)/$(reponame)/$(branchname)
|
siteurl := https://drc.drwater.net/$(projtype)/$(pubtype)/$(reponame)/$(branchname)
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ GREPSTR := " \|(\|)\|^submit\|^analysis\|_cache\|_freeze\|^site_libs\|^www"
|
|||||||
|
|
||||||
all: local upload clean commit push
|
all: local upload clean commit push
|
||||||
|
|
||||||
force: updrefbib check_git_status updvariable render filehash upload clean commit
|
force: updrefbib check_git_status updvariable render
|
||||||
|
|
||||||
local: updrefbib check_git_status updvariable lazyrender
|
local: updrefbib check_git_status updvariable lazyrender
|
||||||
|
|
||||||
@@ -136,6 +136,7 @@ commit:
|
|||||||
pull:
|
pull:
|
||||||
@echo "从远程拉取项目更新..."; \
|
@echo "从远程拉取项目更新..."; \
|
||||||
$(MAKE) check_git_status; \
|
$(MAKE) check_git_status; \
|
||||||
|
git pull; \
|
||||||
current_branch=$$(git rev-parse --abbrev-ref HEAD); \
|
current_branch=$$(git rev-parse --abbrev-ref HEAD); \
|
||||||
if [ "$$current_branch" = main ]; then \
|
if [ "$$current_branch" = main ]; then \
|
||||||
echo "当前分枝为$$current_branch."; \
|
echo "当前分枝为$$current_branch."; \
|
||||||
|
|||||||
Reference in New Issue
Block a user