feat: Generate checksums for the frontend

This commit is contained in:
Alexander Polynomdivision 2018-10-07 13:51:56 +02:00
parent 5c1332da36
commit eed1149b0c
2 changed files with 13 additions and 1 deletions

7
.gitignore vendored
View File

@ -3,6 +3,10 @@
**/.cache/
**/dist/
# Frontend ignores
frontend/lateinicus-web.tar.gz
frontend/sha512sums
# Backend ignores
backend/backend.tar
backend/backend.tgz
@ -10,3 +14,6 @@ backend/backend.tgz
# Server ignores
server/*.pem
server/db/
# Script ignores
scripts/bee-movie.txt

View File

@ -7,6 +7,7 @@ watch: node_modules
clean:
rm -rf dist/
rm -f sha512sums
.PHONY: build
build: prod
@ -16,6 +17,10 @@ prod: node_modules clean
./node_modules/.bin/parcel build --out-dir dist src/lost.html src/error.html
sed -e "s/\/src/\/app\/src/g" --in-place dist/app/index.html
@echo Generate checksums
find ./dist/ -exec sha512sum {} + | awk -F \. '{ if($$4 != "map") print $$0}' | awk -F \/ '{ if($$3 == "lost.html") {} else if ($$3 == "error.html") {} else print $$0}' > sha512sums
@echo Creating tarball
tar -czf lateinicus-web.tar.gz dist/
dev: node_modules clean