More deploy fixups.

This commit is contained in:
Condorra 2023-02-13 22:37:45 +11:00
parent 95b44ac010
commit 61305627e3

View File

@ -18,15 +18,15 @@ tar -cvJf binary-archive-$BUILDSTAMP.tar.xz -C binaries blastmud_game blastmud_l
scp -i deploy-key binary-archive-$BUILDSTAMP.tar.xz blast@$DEPLOY_HOST:/home/blast/archive/ scp -i deploy-key binary-archive-$BUILDSTAMP.tar.xz blast@$DEPLOY_HOST:/home/blast/archive/
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 cd blastmud-repo
ROOT_COMMIT=$(git rev-list HEAD | tail -n 1) ROOT_COMMIT=$(git rev-list HEAD | tail -n 1)
cd .. 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)
cd blastmud-repo cd blastmud-repo
CURRENT_VERSION=$(git rev-parse HEAD)
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 .. cd ..