forked from blasthavers/blastmud
Run git from right directory.
This commit is contained in:
parent
ff43a2d43b
commit
95b44ac010
@ -11,8 +11,6 @@ cat >>~/.ssh/known_hosts <<END
|
|||||||
END
|
END
|
||||||
chmod 0600 ~/.ssh/known_hosts
|
chmod 0600 ~/.ssh/known_hosts
|
||||||
|
|
||||||
ROOT_COMMIT=$(git rev-list HEAD | tail -n 1)
|
|
||||||
|
|
||||||
echo "$DEPLOY_KEY" >deploy-key
|
echo "$DEPLOY_KEY" >deploy-key
|
||||||
chmod 0600 ./deploy-key
|
chmod 0600 ./deploy-key
|
||||||
BUILDSTAMP=$(cat binaries/buildstamp)
|
BUILDSTAMP=$(cat binaries/buildstamp)
|
||||||
@ -21,13 +19,17 @@ scp -i deploy-key binary-archive-$BUILDSTAMP.tar.xz blast@$DEPLOY_HOST:/home/bla
|
|||||||
ssh -i deploy-key blast@$DEPLOY_HOST "find /home/blast/archive -mtime +30 -delete && mkdir -p /home/blast/latest && tar -xvJf /home/blast/archive/binary-archive-$BUILDSTAMP.tar.xz -C /home/blast/latest"
|
ssh -i deploy-key blast@$DEPLOY_HOST "find /home/blast/archive -mtime +30 -delete && mkdir -p /home/blast/latest && tar -xvJf /home/blast/archive/binary-archive-$BUILDSTAMP.tar.xz -C /home/blast/latest"
|
||||||
|
|
||||||
curl --max-time 10 https://blastmud.org/version || true >version
|
curl --max-time 10 https://blastmud.org/version || true >version
|
||||||
|
cd blastmud-repo
|
||||||
|
ROOT_COMMIT=$(git rev-list HEAD | tail -n 1)
|
||||||
|
cd ..
|
||||||
LISTENER_VERSION=$(jq -r .listener_version version || echo ROOT_COMMIT)
|
LISTENER_VERSION=$(jq -r .listener_version version || echo ROOT_COMMIT)
|
||||||
GAMESERVER_VERSION=$(jq -r .gameserver_version version || echo ROOT_COMMIT)
|
GAMESERVER_VERSION=$(jq -r .gameserver_version version || echo ROOT_COMMIT)
|
||||||
CURRENT_VERSION=$(git rev-parse HEAD)
|
CURRENT_VERSION=$(git rev-parse HEAD)
|
||||||
|
|
||||||
|
cd blastmud-repo
|
||||||
LISTENER_CHANGES=$(git diff $LISTENER_VERSION $CURRENT_VERSION -- blastmud_listener blastmud_interfaces | wc -l)
|
LISTENER_CHANGES=$(git diff $LISTENER_VERSION $CURRENT_VERSION -- blastmud_listener blastmud_interfaces | wc -l)
|
||||||
GAMESERVER_CHANGES=$(git diff $LISTENER_VERSION $CURRENT_VERSION -- blastmud_gameserver blastmud_interfaces | wc -l)
|
GAMESERVER_CHANGES=$(git diff $LISTENER_VERSION $CURRENT_VERSION -- blastmud_gameserver blastmud_interfaces | wc -l)
|
||||||
|
cd ..
|
||||||
echo Listener changes: $LISTENER_CHANGES Gameserver changes: $GAMESERVER_CHANGES
|
echo Listener changes: $LISTENER_CHANGES Gameserver changes: $GAMESERVER_CHANGES
|
||||||
|
|
||||||
if [[ $GAMESERVER_CHANGES != "0" ]]; then
|
if [[ $GAMESERVER_CHANGES != "0" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user