Clean up `TMP_DIR`
The script doesn't delete the TMP_DIR
when it completes, either successfully or when it aborts due to a gitref mismatch. If a runner is re-used for a subsequent build, it will fail due to TMP_DIR
already existing.
-
Randomize TMP_DIR
name and create as a subdirectory of currentTMP_DIR
(mkdir -p
) -
Introduce cleanup function to remove TMP_DIR
-
Call cleanup function before early exits and script completion
Edited by Erick Hitter