urbit/nix/ops/fakeship/builder.sh
~siprel 382ace5f23 travis: Various fixes and improvements.
1. Fix bug in test builds that was causing failures for some reason I
   still don't understand.

  `tee` output to stderr was failing with "resource temporarily
  unavailable". The hack that fixed it was to simply write the herb
  output to a file and dump it to stdout after it fully completes.

2. sh/cachix works without CACHIX keys. Simply doesn't upload in that case.

3. Write code to cache testbus builds (disabled for now)

4. fakeship builds get further in bootstrap sequence before committing.

  This fixes problems with PRs from forked repos and enables the scripts
  to be run locally.
2020-06-11 20:34:50 +00:00

27 lines
402 B
Bash
Executable File

source $stdenv/setup
set -ex
if [ -z "$ARVO" ]
then
$URBIT -d -F $SHIP -B "$PILL" $out
else
$URBIT -d -F $SHIP -A "$ARVO" -B "$PILL" $out
fi
check () {
[ 3 -eq "$(herb $out -d 3)" ]
}
if check && sleep 10 && check
then
echo "Boot success." >&2
herb $out -p hood -d '+hood/exit' || true
else
echo "Boot failure." >&2
kill $(< $out/.vere.lock) || true
exit 1
fi
set +x