Füge ein neues Deployment-Workflow-Skript hinzu und entferne veraltete Skripte

This commit is contained in:
2025-03-27 12:12:55 +00:00
parent 212a9720cf
commit 3a6ff3fa8e
4 changed files with 190 additions and 82 deletions

View File

@@ -1,40 +0,0 @@
#!/bin/sh
host=$1
user=$2
pass=$3
if [ "$host" == "" ]; then
echo "missing host"
exit 1
fi
if [ "$user" == "" ]; then
echo "missing username"
exit 1
fi
if [ "$pass" == "" ]; then
echo "missing password"
exit 1
fi
echo "sync frontend"
rsync -rlcgD --perms -i -u -v --stats --progress \
--delete \
-e "sshpass -p $pass ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 22222" \
frontend/ \
$user@$host:./frontend/
echo "sync api config"
rsync -rlcgD --perms -i -u -v --stats --progress \
--delete \
-e "sshpass -p $pass ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 22222" \
api/ \
$user@$host:./api/
echo "create media directory"
mkdir media
chmod 770 media
rsync -rlcgD --perms -i -u -v --stats --progress \
-e "sshpass -p $pass ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 22222" \
media \
$user@$host:./

View File

@@ -1,5 +0,0 @@
#!/bin/sh
files=`find .drone.yml api src -type f -name "config*" -or -name "*drone*"`
grep -E "__.*__" $files | grep -v TIMESTAMP

View File

@@ -1,37 +0,0 @@
#!/bin/bash
branch=$1
url=$2
if [ "$branch" == "" ]; then
echo missing branch name
exit 1
fi
if [ "$url" == "" ]; then
echo missing url
exit 1
fi
if [ "$branch" == "master" ]; then
paypal=live
fi
sed -i 's#\(apiBase:\).*#apiBase:"'$url'/api/",#g' api/hooks/config.js
sed -i 's#\(frontendBase:\).*#frontendBase:"'$url'/",#g' api/hooks/config.js
sed -i 's#\(pppReturnURL:\).*#pppReturnURL:"'$url'/checkout/overview\?type=paypal",#g' api/hooks/config.js
sed -i 's#\(pppCancelURL:\).*#pppCancelURL:"'$url'/checkout/payment\?type=paypal",#g' api/hooks/config.js
sed -i 's#\(var paypalMode *=\).*#var paypalMode = "'$paypal'"#g' api/hooks/config.js
cat api/hooks/config.js
sed -i 's#\(sentryEnvironment.*\)".*"#\1"'$branch'"#g' src/config.ts
if [[ "$branch" == "master" || "$branch" == "dev" ]]; then
sed -i 's#//\( sentry\\.init.*\)#\1#g' src/config.ts
fi
cat src/config.ts
if [ "$branch" != "master" ]; then
sed -i 's#\(namespace:.*\)#\1_'$branch'#g' api/config.yml
cat api/config.yml
fi