Jenkins: Recreate output directory if it was deleted

This commit is contained in:
RichardG867
2021-11-17 18:11:10 -03:00
parent daa8f6731c
commit f15f2c96e9

View File

@@ -172,6 +172,9 @@ then
# Clean local tree of gitignored files.
git clean -dfX
# Recreate output directory if it was removed by git clean.
[ ! -d "$cwd" ] && mkdir -p "$cwd"
# Save current HEAD commit to VERSION.
git log --stat -1 > VERSION || rm -f VERSION