fix git failing to switch branches during update

This commit is contained in:
wh1te909 2020-11-25 01:18:26 +00:00
parent e1a9791f44
commit 6de79922c5
2 changed files with 6 additions and 2 deletions

4
install.sh Executable file → Normal file
View File

@ -1,6 +1,6 @@
#!/bin/bash
SCRIPT_VERSION="21"
SCRIPT_VERSION="22"
SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/develop/install.sh'
GREEN='\033[0;32m'
@ -284,6 +284,8 @@ sudo mkdir -p /var/log/celery
sudo chown ${USER}:${USER} /var/log/celery
git clone https://github.com/wh1te909/tacticalrmm.git /rmm/
cd /rmm
git config user.email "admin@example.com"
git config user.name "Bob"
git checkout master
localvars="$(cat << EOF

View File

@ -1,6 +1,6 @@
#!/bin/bash
SCRIPT_VERSION="96"
SCRIPT_VERSION="97"
SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/develop/update.sh'
LATEST_SETTINGS_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/api/tacticalrmm/tacticalrmm/settings.py'
YELLOW='\033[1;33m'
@ -63,6 +63,8 @@ sudo systemctl stop ${i}
done
cd /rmm
git config user.email "admin@example.com"
git config user.name "Bob"
git fetch
git checkout master
git reset --hard FETCH_HEAD