Add log statements to scripts

This commit is contained in:
Florine W. Dekker 2021-04-14 19:24:11 +02:00
parent 52995adc46
commit cc0591e279
Signed by: FWDekker
GPG Key ID: B1B567AF58D6EE0F
4 changed files with 32 additions and 4 deletions

View File

@ -4,17 +4,24 @@
# $3 = temp dir
echo "[[ Deploy ]] jekyll: $1 $2 $3"
while [ -e "$3" ]
do
echo "Waiting for another process to finish deploying..."
echo "[[ Deploy ]] Waiting for another process to finish deploying..."
sleep 3
done
echo "[[ Deploy ]] Creating directories '$2' and '$3'"
mkdir -p "$2" "$3"
echo "[[ Deploy ]] Cloning repository at '$1' into '$3'"
git clone "$1" "$3"
echo "[[ Deploy ]] Building Jekyll at '$3' into '$2'"
jekyll build --source "$3" --destination "$2"
chmod -R g+w "$2"
echo "[[ Deploy ]] Deleting '$3'"
rm -rf "$3"

View File

@ -4,21 +4,29 @@
# $3 = temp dir
echo "[[ Deploy ]] npm: $1 $2 $3"
while [ -e "$3" ]
do
echo "Waiting for another process to finish deploying..."
echo "[[ Deploy ]] Waiting for another process to finish deploying..."
sleep 3
done
echo "[[ Deploy ]] Creating directories '$2' and '$3'"
mkdir -p "$2" "$3"
echo "[[ Deploy ]] Cloning repository at '$1' into '$3'"
git clone "$1" "$3"
echo "[[ Deploy ]] Deploying npm at '$3' into '$3/dist'"
cd "$3" || exit
npm ci
npm run deploy
echo "[[ Deploy ]] Copying files from '$3/dist' to '$2'"
cp -r dist/ "$2"
chmod -R g+w "$2"
echo "[[ Deploy ]] Deleting '$3'"
rm -rf "$3"

View File

@ -4,18 +4,25 @@
# $3 = temp dir
echo "[[ Deploy ]] static: $1 $2 $3"
while [ -e "$3" ]
do
echo "Waiting for another process to finish deploying..."
echo "[[ Deploy ]] Waiting for another process to finish deploying..."
sleep 3
done
echo "[[ Deploy ]] Creating directories '$2' and '$3'"
mkdir -p "$2" "$3"
echo "[[ Deploy ]] Cloning repository at '$1' into '$3'"
git clone "$1" "$3"
rm -rf "$3/.git/"
echo "[[ Deploy ]] Copying files from '$3' to '$2'"
cp -r "$3" "$2"
chmod -R g+w "$2"
echo "[[ Deploy ]] Deleting '$3'"
rm -rf "$3"

View File

@ -4,15 +4,21 @@
# $3 = temp dir
echo "[[ Deploy ]] mirror-to-github: $1 $2 $3"
while [ -e "$3" ]
do
echo "Waiting for another process to finish deploying..."
echo "[[ Deploy ]] Waiting for another process to finish deploying..."
sleep 3
done
echo "[[ Deploy ]] Bare cloning repository at '$1' into '$3'"
git clone --bare "$1" "$3"
echo "[[ Deploy ]] Mirroring repo at '$3' with '$2'"
cd "$3" || exit
git push --mirror "$2"
echo "[[ Deploy ]] Deleting '$3'"
rm -rf "$3"