From 1bc5783a3d253021f82d21f123b00a8fe45d08e3 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Fri, 7 Dec 2018 15:30:25 -0800 Subject: Prevent untracked files in releases Signed-off-by: Joffrey F --- scripts/release.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index f3ace27..d9e7a05 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -12,8 +12,9 @@ if [ -z $VERSION ]; then exit 1 fi -echo "##> Removing stale build files" -rm -rf ./build || exit 1 +echo "##> Removing stale build files and other untracked files" +git clean -x -d -i +test -z "$(git clean -x -d -n)" || exit 1 echo "##> Tagging the release as $VERSION" git tag $VERSION -- cgit v1.2.1