You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
637 B
Bash
19 lines
637 B
Bash
4 years ago
|
set -e
|
||
|
|
||
7 years ago
|
SSH_HOST=client.etesync.com
|
||
|
SSH_PORT=22
|
||
|
SSH_USER=etesync
|
||
4 years ago
|
SSH_TARGET_DIR=sites/pim.etesync.com
|
||
7 years ago
|
|
||
|
OUTPUTDIR=./build
|
||
|
|
||
6 years ago
|
export INLINE_RUNTIME_CHUNK=false
|
||
|
|
||
7 years ago
|
yarn build
|
||
|
|
||
|
sed -i "s#\(<script type=\"text/javascript\"\)#\1 integrity=\"sha384-$(shasum -b -a 384 build/static/js/main.*.js | xxd -r -p | base64 -w0)\" crossorigin=\"anonymous\"#" build/index.html
|
||
4 years ago
|
./page-signer.js build/index.html build/index.html
|
||
5 years ago
|
# Create a source tarball
|
||
|
bsdtar -czf build/etesync-web.tgz --exclude build/etesync-web.tgz -s /build/etesync-web/ build/*
|
||
5 years ago
|
rsync -e "ssh -p ${SSH_PORT}" -P --delete -rvc -zz ${OUTPUTDIR}/ ${SSH_USER}@${SSH_HOST}:${SSH_TARGET_DIR}
|