modify Makefile to add commit hash to book.toml before building, then clean up
afterwards
This commit is contained in:
parent
241c45d390
commit
76ec3ccb49
9
Makefile
9
Makefile
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue