mapcomplete/deploy.sh

37 lines
1.2 KiB
Bash
Raw Normal View History

2020-07-16 17:29:52 +02:00
#! /bin/bash
2020-09-18 11:55:36 +02:00
mkdir -p assets/generated
ts-node createLayouts.ts
find -name '*.png' | parallel optipng '{}'
2020-07-16 17:29:52 +02:00
npm run build
2020-08-22 03:15:42 +02:00
2020-09-05 01:40:43 +02:00
if [[ $1 == "production" ]]
then
echo "DEPLOYING TO PRODUCTION!"
2020-09-18 11:55:36 +02:00
mv /home/pietervdvn/git/buurtnatuur.github.io/CNAME /home/pietervdvn/git/
mv /home/pietervdvn/git/buurtnatuur.github.io/.git /home/pietervdvn/git/
rm -rf /home/pietervdvn/git/buurtnatuur.github.io/*
cp -r dist/* /home/pietervdvn/git/buurtnatuur.github.io/
mv /home/pietervdvn/git/CNAME /home/pietervdvn/git/buurtnatuur.github.io/
mv /home/pietervdvn/git/.git /home/pietervdvn/git/buurtnatuur.github.io/
cd /home/pietervdvn/git/buurtnatuur.github.io/
elif [[ $1 == "groen" ]]
then
echo "DEPLOYING TO BUURTNATUUR"
2020-09-05 01:40:43 +02:00
rm -rf /home/pietervdvn/git/pietervdvn.github.io/MapComplete/*
cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/MapComplete/
cd /home/pietervdvn/git/pietervdvn.github.io/MapComplete/
else
echo "Testversion deploy"
rm -rf /home/pietervdvn/git/pietervdvn.github.io/Staging/*
cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/Staging/
cd /home/pietervdvn/git/pietervdvn.github.io/Staging/
fi
2020-09-18 11:55:36 +02:00
git add *
git commit -am "New mapcomplete version"
git push
2020-08-22 03:15:42 +02:00
cd -
2020-09-10 19:33:06 +02:00
./clean.sh
2020-09-18 11:55:36 +02:00
echo "DEPLOYED $1"