sergay/code/gitup.sh

19 lines
413 B
Bash
Executable File

set -a
source .env
set +a
cd ~/sergay || exit 1
git rebase --continue
git add .
if ! git diff --cached --quiet; then
git commit -m "update" || exit 1
else
echo "Нет новых изменений"
fi
git pull --rebase "https://gitek.duckdns.org/igor/sergay.git" main || exit 1
git push "https://igor:${GIT}@gitek.duckdns.org/igor/sergay.git"
cp /root/sergay/code/sergay.json /root/api/sergay.json