File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 354354 '' ;
355355
356356 withPgrst =
357+ let
358+ commandName = "postgrest-with-pgrst" ;
359+ in
357360 checkedShellScript
358361 {
359- name = "postgrest-with-pgrst" ;
362+ name = commandName ;
360363 docs = "Build and run PostgREST and run <command> with PGRST_SERVER_UNIX_SOCKET set." ;
361364 args =
362365 [
379382 rm -f result
380383 build_start=$SECONDS
381384 if [ -z "'' ${PGRST_BUILD_CABAL:-}" ]; then
382- echo -n "Building postgrest (nix)... "
385+ echo -n "${ commandName } : Building postgrest (nix)... "
383386 # Using lib.getBin to also make this work with older checkouts, where .bin was not a thing, yet.
384387 nix-build -E 'with import ./. {}; pkgs.lib.getBin postgrestPackage' > "$tmpdir"/build.log 2>&1 || {
385388 echo "failed, output:"
388391 }
389392 PGRST_CMD=$(echo ./result*/bin/postgrest)
390393 else
391- echo -n "Building postgrest (cabal)... "
394+ echo -n "${ commandName } : Building postgrest (cabal)... "
392395 postgrest-build
393396 PGRST_CMD=postgrest-run
394397 fi
398401
399402 ver=$($PGRST_CMD ${ legacyConfig } --version)
400403
401- echo -n "Starting $ver... "
404+ echo -n "${ commandName } : Starting $ver... "
402405
403406 $PGRST_CMD ${ legacyConfig } > "$tmpdir"/run.log 2>&1 &
404407 pid=$!
425428 wait_duration=$((SECONDS - wait_start))
426429 printf "done in %ss.\n" "$wait_duration"
427430
431+ echo "${ commandName } : You can tail the server logs with: tail -f $tmpdir/run.log"
432+
428433 if [[ -n "$_arg_monitor" ]]; then
429434 ${ monitorPid } "$pid" > "$_arg_monitor" &
430435 fi
You can’t perform that action at this time.
0 commit comments