autocommit
This commit is contained in:
parent
dfd33a0d3e
commit
bec7fa8f9a
87
_push-all.sh
Normal file
87
_push-all.sh
Normal file
@ -0,0 +1,87 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Auto push all dependences..."
|
||||
|
||||
echo "push install..."
|
||||
cd /data/install
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push install main
|
||||
|
||||
echo "push server-origin..."
|
||||
cd /data/server-origin
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push server-origin main
|
||||
|
||||
echo "push utils..."
|
||||
cd /data/utils
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push utils main
|
||||
|
||||
echo "push backup..."
|
||||
cd /data/backup
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push backup main
|
||||
|
||||
echo "push traefik..."
|
||||
cd /data/traefik
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push traefik main
|
||||
|
||||
|
||||
echo "push postgres..."
|
||||
cd /data/postgres
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push postgres main
|
||||
|
||||
echo "push pgadmin..."
|
||||
cd /data/pgadmin
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push pgadmin main
|
||||
|
||||
echo "push gitea..."
|
||||
cd /data/gitea
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push gitea main
|
||||
|
||||
echo "push gitea-init..."
|
||||
cd /data/gitea-init
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push gitea-init main
|
||||
|
||||
|
||||
echo "push mariadb..."
|
||||
cd /data/mariadb
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push mariadb main
|
||||
|
||||
echo "push blog-wp..."
|
||||
cd /data/blog-wp
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push blog-wp main
|
||||
|
||||
echo "push blog-wp-install..."
|
||||
cd /data/blog-wp-install
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push blog-wp-install main
|
||||
|
||||
|
||||
echo "push tetris..."
|
||||
cd /data/tetris
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push tetris main
|
||||
|
||||
|
||||
echo "Push server-origin complete"
|
110
push-all.sh
110
push-all.sh
@ -1,87 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Auto push all dependences..."
|
||||
LIST_FILE="./push.list"
|
||||
ENV_FILE="./push.env"
|
||||
|
||||
echo "push install..."
|
||||
cd /data/install
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push install main
|
||||
echo "Checking for a push.list file..."
|
||||
if [ ! -f "$LIST_FILE" ]; then
|
||||
echo "File $LIST_FILE not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "push server-origin..."
|
||||
cd /data/server-origin
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push server-origin main
|
||||
echo "Including a file with environment variables..."
|
||||
if [ -f $ENV_FILE ]; then
|
||||
source $ENV_FILE
|
||||
else
|
||||
echo "File install.env not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "push utils..."
|
||||
cd /data/utils
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push utils main
|
||||
echo "Reading a list file and creating repositories..."
|
||||
OLDIFS=$IFS
|
||||
IFS=' | '
|
||||
while read -r NAME_REPO DESCRIPTION_REPO; do
|
||||
if [ "$NAME_REPO" != "NAME_REPO" ]; then # Skip title
|
||||
cd /data/$NAME_REPO
|
||||
git remote remove ${GIT_REMOTE_PREFIX}$NAME_REPO
|
||||
git remote add ${GIT_REMOTE_PREFIX}$NAME_REPO git@$GIT_HOST:$GIT_NAME/$NAME_REPO.git
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push ${GIT_REMOTE_PREFIX}$NAME_REPO $GIT_BRANCH
|
||||
fi
|
||||
done < "$LIST_FILE"
|
||||
IFS=$OLDIFS
|
||||
|
||||
echo "push backup..."
|
||||
cd /data/backup
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push backup main
|
||||
|
||||
echo "push traefik..."
|
||||
cd /data/traefik
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push traefik main
|
||||
|
||||
|
||||
echo "push postgres..."
|
||||
cd /data/postgres
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push postgres main
|
||||
|
||||
echo "push pgadmin..."
|
||||
cd /data/pgadmin
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push pgadmin main
|
||||
|
||||
echo "push gitea..."
|
||||
cd /data/gitea
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push gitea main
|
||||
|
||||
echo "push gitea-init..."
|
||||
cd /data/gitea-init
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push gitea-init main
|
||||
|
||||
|
||||
echo "push mariadb..."
|
||||
cd /data/mariadb
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push mariadb main
|
||||
|
||||
echo "push blog-wp..."
|
||||
cd /data/blog-wp
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push blog-wp main
|
||||
|
||||
echo "push blog-wp-install..."
|
||||
cd /data/blog-wp-install
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push blog-wp-install main
|
||||
|
||||
|
||||
echo "push tetris..."
|
||||
cd /data/tetris
|
||||
git add -A
|
||||
git commit -m autocommit
|
||||
git push tetris main
|
||||
|
||||
|
||||
echo "Push server-origin complete"
|
||||
echo "Push complete"
|
4
push.env
Normal file
4
push.env
Normal file
@ -0,0 +1,4 @@
|
||||
GIT_HOST=rozenlab.com
|
||||
GIT_NAME=leo
|
||||
GIT_REMOTE_PREFIX=""
|
||||
GIT_BRANCH=main
|
13
push.list
Normal file
13
push.list
Normal file
@ -0,0 +1,13 @@
|
||||
NAME_REPO | DESCRIPTION_REPO
|
||||
utils | shell utils
|
||||
install | first initialize server
|
||||
traefik | Traefik Docker configuration
|
||||
gitea | Gitea Docker configuration
|
||||
backup | Backup all databases & files
|
||||
server-origin | Head site, repositories, etc
|
||||
blog-wp | Wordpress dev blog
|
||||
blog-wp-install | Init wordpress blog
|
||||
mariadb | Docker Mariadb for Wordpress dev blog
|
||||
gitea-init | Create all repos of origin in Gitea
|
||||
postgres | Docker postgres for traefik
|
||||
pgadmin | Docker pgadmin for traefik
|
Loading…
Reference in New Issue
Block a user