nix(feat): Create all temporary directories with script name template

Temporary directories are now created in $TMPDIR/postgrest/script-name-XXX. This allows recognizing the origin of a single temporary directory and uploading the whole $TMPDIR/postgrest folder as an artifact in CI.
This commit is contained in:
Wolfgang Walther
2021-04-24 15:07:13 +02:00
committed by Wolfgang Walther
parent 14ddecc81a
commit c691b37f76
3 changed files with 14 additions and 3 deletions
+2
View File
@@ -41,6 +41,8 @@ let
}
mkdir -p "$tmpdir"/{db,socket}
# remove data dir, even if we keep tmpdir - no need to upload it to artifacts
trap 'rm -rf $tmpdir/db' EXIT
export PGDATA="$tmpdir/db"
export PGHOST="$tmpdir/socket"