modify Makefile to add commit hash to book.toml before building, then clean up #53

Open
anton wants to merge 1 commits from anton/add-commit-hash-to-title into main
1 changed files with 8 additions and 1 deletions

View File

@ -1,20 +1,27 @@
PORT := 8080
COMMIT_HASH := $(shell git log -1 --pretty=format:%H | cut -c1-10)
.PHONY: default
default: build-qvs
out:
mkdir -p out
.PHONY: clean
clean:
rm -rf out/
.PHONY: build-qvs
build-qvs: out/qvs/index.json
build-qvs: clean out/qvs/index.json
out/qvs/index.json: out Containerfile.qvs $(shell find quorum-vault-system -type f)
mkdir -p out/qvs
sed -i "/^title *=/c\title = \"Quorum Vault System (QVS) ${COMMIT_HASH}\"" quorum-vault-system/book.toml
docker \
build \
-f Containerfile.qvs \
--output type=oci,rewrite-timestamp=true,force-compression=true,name=git.distrust.co/public/docs-qvs,tar=true,dest=- \
. \
| tar -C out/qvs -mx
sed -i "/^title *=/c\title = \"Quorum Vault System (QVS)\"" quorum-vault-system/book.toml
.PHONY: serve-qvs
serve-qvs: build-qvs