Update Makefile

This commit is contained in:
2025-03-21 15:02:15 +08:00
parent b763e73c8e
commit 2c7a681947
+3 -2
View File
@@ -17,7 +17,7 @@ branchname := $(shell git branch --show-current)
reponame := $(shell basename $(shell git rev-parse --show-toplevel))
projtype := $(shell basename $(shell dirname $(shell git rev-parse --show-toplevel)))
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)
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
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
@@ -136,6 +136,7 @@ commit:
pull:
@echo "从远程拉取项目更新..."; \
$(MAKE) check_git_status; \
git pull; \
current_branch=$$(git rev-parse --abbrev-ref HEAD); \
if [ "$$current_branch" = main ]; then \
echo "当前分枝为$$current_branch."; \