Adding locking mechanism.

This commit is contained in:
sergiotarxz 2022-02-08 21:26:24 +01:00
parent 9d0ce43bd1
commit 06b6462ab5
1 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,10 @@
source ~/.bashrc
cd $(dirname $0)
if [ -f aleta.lock ]; then
echo 'Deploy is running.';
fi
touch aleta.lock
pushd aleta
git fetch
current_commit=$(git rev-parse HEAD)
@ -21,5 +25,5 @@ if [ ! -e output/aleta.tar.gz ]; then
echo "aleta.tar.gz not exists." 1>&2
exit 1
fi
rm aleta.lock
perl create_aleta_release.pl