Added command for publishing PLFA.
This commit is contained in:
parent
3d4c9f7a1d
commit
5e0f54eb74
1 changed files with 42 additions and 0 deletions
42
Makefile
42
Makefile
|
@ -91,6 +91,40 @@ list:
|
||||||
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
|
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
########################################
|
||||||
|
# Publish PLFA
|
||||||
|
########################################
|
||||||
|
|
||||||
|
.PHONY: publish
|
||||||
|
publish: setup-check-rsync
|
||||||
|
@echo "Cleaning up..."
|
||||||
|
make clean
|
||||||
|
@echo "Building site..."
|
||||||
|
make build
|
||||||
|
@echo "Testing site..."
|
||||||
|
make test
|
||||||
|
@echo "Creating web branch..."
|
||||||
|
git fetch --all
|
||||||
|
git checkout -b web --track origin/web
|
||||||
|
rsync -a \
|
||||||
|
--filter='P _site/' \
|
||||||
|
--filter='P _cache/' \
|
||||||
|
--filter='P .git/' \
|
||||||
|
--filter='P .gitignore' \
|
||||||
|
--filter='P .stack-work' \
|
||||||
|
--filter='P CNAME' \
|
||||||
|
--delete-excluded \
|
||||||
|
_site/ .
|
||||||
|
git add -A
|
||||||
|
@echo "Publishing web branch..."
|
||||||
|
git commit -m "Publish."
|
||||||
|
git push origin web:web
|
||||||
|
@echo "Deleting web branch..."
|
||||||
|
git checkout dev
|
||||||
|
git branch -D web
|
||||||
|
|
||||||
|
|
||||||
#################################################################################
|
#################################################################################
|
||||||
# Setup dependencies
|
# Setup dependencies
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
@ -135,6 +169,14 @@ ifeq (,$(wildcard $(shell which epubcheck)))
|
||||||
@echo "See: https://github.com/w3c/epubcheck"
|
@echo "See: https://github.com/w3c/epubcheck"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
.PHONY: setup-check-rsync
|
||||||
|
setup-check-rsync:
|
||||||
|
ifeq (,$(wildcard $(shell which rsync)))
|
||||||
|
@echo "The command you called requires rsync"
|
||||||
|
@echo "See: https://rsync.samba.org/"
|
||||||
|
@exit 1
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: setup-install-htmlproofer
|
.PHONY: setup-install-htmlproofer
|
||||||
setup-install-htmlproofer: setup-check-gem
|
setup-install-htmlproofer: setup-check-gem
|
||||||
ifeq (,$(wildcard $(shell which htmlproofer)))
|
ifeq (,$(wildcard $(shell which htmlproofer)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue