Actually fix the tar deletion issue
This commit is contained in:
@@ -172,20 +172,26 @@ then
|
|||||||
# Clean local tree of gitignored files.
|
# Clean local tree of gitignored files.
|
||||||
git clean -dfX
|
git clean -dfX
|
||||||
|
|
||||||
|
# Recreate output directory if it was removed by git clean.
|
||||||
|
[ ! -d "$cwd" ] && mkdir -p "$cwd"
|
||||||
|
|
||||||
# Save current HEAD commit to VERSION.
|
# Save current HEAD commit to VERSION.
|
||||||
git log --stat -1 > VERSION || rm -f VERSION
|
git log --stat -1 > VERSION || rm -f VERSION
|
||||||
|
|
||||||
# Archive source.
|
# Archive source.
|
||||||
make_tar "$cwd/$tarball_name.tar"
|
rm -f "$tarball_name.tar*"
|
||||||
|
make_tar "$tarball_name.tar"
|
||||||
status=$?
|
status=$?
|
||||||
|
|
||||||
# Check if the archival succeeded.
|
# Check if the archival succeeded.
|
||||||
if [ $status -ne 0 ]
|
if [ $status -ne 0 ]
|
||||||
then
|
then
|
||||||
echo [!] Tarball creation failed with status [$status]
|
echo [!] Tarball creation failed with status [$status]
|
||||||
|
rm -f "$tarball_name.tar*"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo [-] Source tarball [$tarball_name] created successfully
|
echo [-] Source tarball [$tarball_name] created successfully
|
||||||
|
mv "$tarball_name.tar*" "$cwd/"
|
||||||
[ -z "$package_name" ] && exit 0
|
[ -z "$package_name" ] && exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -30,6 +30,7 @@ Makefile
|
|||||||
/archive_tmp
|
/archive_tmp
|
||||||
/static2dll.*
|
/static2dll.*
|
||||||
/VERSION
|
/VERSION
|
||||||
|
/target
|
||||||
*.zip
|
*.zip
|
||||||
*.tar
|
*.tar
|
||||||
*.tar.*
|
*.tar.*
|
||||||
|
Reference in New Issue
Block a user