survey/scripts/bundle.sh
realaravinth 2609ade2a5
Setup ts compilation
- import frontend code from mCaptcha/benchs
- setup TS compilation workflow
- import vendor code from mCaptcha/mCaptcha/browser
- rewrite bench.js import in bundle.js to include file's hash
2021-10-12 14:02:34 +05:30

7 lines
198 B
Bash
Executable file

#!/bin/bash
bench_hash=$(sha256sum ./static/cache/bundle/bench.js \
| cut -d " " -f 1 \
| tr "[:lower:]" "[:upper:]")
sed -i "s/bench.js/bench.$bench_hash.js/" ./static/cache/bundle/bundle.js