Created
December 21, 2017 03:24
-
-
Save chessai/003c86adac8276d6935051381e5cd39b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
nix_opts='--show-trace --option extra-binary-caches https://nixcache.reflex-frp.org' | |
# use succ_opts when builds succeed | |
succ_opts='-j -8 -Q' | |
# use fail_opts when builds fail (for debugging with nix) | |
fail_opts='-j -1 --keep-going' | |
static=$(nix-build $nix_opts $fail_opts frontend.nix | tail -n 1) | |
if [ -z $static ]; then | |
echo "frontend build failed" | |
exit 1 | |
fi | |
echo "$static" | |
nix-build $nix_opts $fail_opts ../../backend/server | |
echo 'starting server ...' | |
./result/bin/server --static "$static" "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment