This repository has been archived on 2021-03-09. You can view files and clone it, but cannot push or open issues or pull requests.
graf-uloh/frontend/tools/deploy-local
Martin Mares 09c60434fa Deploy: První pokus o skripty pro instalaci na Gimliho
Recyklovány některé části instalační mašinerie KSP webu,
zejména máme společné zamykání.
2020-11-30 00:03:43 +01:00

24 lines
711 B
Bash
Executable file

#!/bin/bash
# This script is the bottom half of tools/deploy. It runs locally at Gimli
# in /akce/ksp/<instance>/kurzy-src/frontend, where the current source tree is already
# checked out. It builds and installs everything.
set -e
# Locale is set explicitly here, for its passing over SSH is unreliable.
unset -v $(locale | cut -d'=' -f1) # unset locale; LC_ALL overrides all
export LANG=C # default for LC_* except LC_ALL
export LC_CTYPE=cs_CZ.UTF-8
echo "## Building the course"
nice yarnpkg install --frozen-lockfile
nice yarnpkg build
DEST=../../static/kurz
mkdir -p $DEST
for f in public/build/bundle.{css,js} ../tasks.json ; do
b=$(basename $f)
cp $f $DEST/$b.new
mv $DEST/$b.new $DEST/$b
done