Skip to content

Commit cf82975

Browse files
committed
Add file locking to deployment
1 parent 6216365 commit cf82975

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: deploy.sh

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#!/usr/bin/env bash
22

3+
if [ -f .deploy_in_progress ];
4+
then
5+
echo "Deploy already in progress";
6+
exit 0;
7+
fi
8+
9+
touch .deploy_in_progress;
10+
311
# Trick daux.io into thinking there's a zip file it can link to
412
if [ ! -f modmore-documentation.zip ];
513
then
@@ -21,7 +29,10 @@ if vendor/bin/daux generate --source=. --destination=html_tmp ; then
2129
# Remove the html folder
2230
rm -rf html/;
2331
mv html_tmp/ html;
32+
33+
rm .deploy_in_progress;
2434
else
2535
echo "Failed generating documentation";
36+
rm .deploy_in_progress;
2637
exit 1;
2738
fi

0 commit comments

Comments
 (0)