Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions release/build-and-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ find builds -mindepth 1 -delete
if [ "$1" = "nightly" ]; then
export UPDATE_FLAGS="-DAUTOUPDATE=OFF -DINFORM_UPDATE=OFF"
export UPDATE_FLAGS_MACOS="-DINFORM_UPDATE=OFF"
V="$(curl -s https://raw.githubusercontent.com/$MAIN_REPO_USER/$MAIN_REPO_NAME/$MAIN_REPO_BRANCH/src/game/version.h | grep "^#define GAME_RELEASE_VERSION_INTERNAL" | cut -d' ' -f3)"
V="$(curl -s https://raw.githubusercontent.com/$MAIN_REPO_USER/$MAIN_REPO_NAME/$MAIN_REPO_BRANCH/src/game/version.h | grep "^#define GAME_RELEASE_VERSION_INTERNAL" | cut -d'"' -f2)"
export VERSION="$V-$(date -d '+2 hours' +%Y%m%d)"
./build.sh $VERSION &> builds/DDNet-nightly.log || { echo "build.sh failed, see builds/DDNet-nightly.log"; exit 1 }

Expand Down Expand Up @@ -53,7 +53,7 @@ elif [ "$1" = "playground" ]; then
export UPDATE_FLAGS_MACOS="-DINFORM_UPDATE=OFF"
export MAIN_REPO_USER=Jupeyy
export MAIN_REPO_BRANCH=playground
V="$(curl -s https://raw.githubusercontent.com/$MAIN_REPO_USER/$MAIN_REPO_NAME/$MAIN_REPO_BRANCH/src/game/version.h | grep "^#define GAME_RELEASE_VERSION_INTERNAL" | cut -d' ' -f3)"
V="$(curl -s https://raw.githubusercontent.com/$MAIN_REPO_USER/$MAIN_REPO_NAME/$MAIN_REPO_BRANCH/src/game/version.h | grep "^#define GAME_RELEASE_VERSION_INTERNAL" | cut -d'"' -f2)"
export VERSION="$V-$(date -d '+2 hours' +%Y%m%d)"
./build.sh $VERSION &> builds/DDNet-playground.log || { echo "build.sh failed, see builds/DDNet-playground.log"; exit 1 }
elif [ "$1" = "rc" ]; then
Expand Down
4 changes: 3 additions & 1 deletion release/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set -ex
# always without autoupdater and without update info. For nightlies and RCs use:
# UPDATE_FLAGS="-DAUTOUPDATE=OFF -DINFORM_UPDATE=OFF" UPDATE_FLAGS_MACOS=-DINFORM_UPDATE=OFF
UPDATE_FLAGS="${UPDATE_FLAGS:--DAUTOUPDATE=ON}"
UPDATE_FLAGS_MACOS="${UPDATE_FLAGS_MACOS:-}"
UPDATE_FLAGS_MACOS="${UPDATE_FLAGS_MACOS:--DAUTOUPDATE=ON}"

MAIN_REPO_USER="${MAIN_REPO_USER:-ddnet}"
MAIN_REPO_NAME="${MAIN_REPO_NAME:-ddnet}"
Expand Down Expand Up @@ -301,6 +301,8 @@ rm -rf ddnet-source $MAIN_REPO_NAME-$MAIN_REPO_COMMIT $LIBS_REPO_NAME-$LIBS_REPO
unzip -q main.zip
mv $MAIN_REPO_NAME-$MAIN_REPO_COMMIT ddnet-source
curl -s https://api.github.com/repos/ddnet/ddnet/commits/master | jq -r ".commit.committer.date" | xargs -I{} date -d {} +%s > ddnet-source/source_date_epoch
# Builds from the source download have no git repository to read the revision from
echo $MAIN_REPO_COMMIT > ddnet-source/git_revision
cp -r ddnet-source DDNet-$VERSION

export DDNET_GIT_SHORTREV_HASH=$MAIN_REPO_COMMIT
Expand Down
13 changes: 13 additions & 0 deletions update/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ if ls DDNet-$VERSION-linux_x86_64/*.so 2>&1 > /dev/null; then
for i in DDNet-$VERSION-linux_x86_64/*.so; do mcp $i ${i:r:t}-linux-x86_64.so; done
fi

dmg2img -s -i /var/www/downloads/DDNet-$VERSION-macos.dmg -o DDNet-macos.img
MACOS_LOOP=$(losetup -f --show -P DDNet-macos.img)
mkdir -p macos-mnt
mount -t hfsplus -o ro ${MACOS_LOOP}p1 macos-mnt
tar -C macos-mnt -c --owner=0 --group=0 DDNet.app | xz -T0 > DDNet-macos.tar.xz.$$.tmp
mv DDNet-macos.tar.xz.$$.tmp DDNet-macos.tar.xz
tar -C macos-mnt -c --owner=0 --group=0 DDNet-Server.app | xz -T0 > DDNet-Server-macos.tar.xz.$$.tmp
mv DDNet-Server-macos.tar.xz.$$.tmp DDNet-Server-macos.tar.xz
umount macos-mnt
losetup -d $MACOS_LOOP
rmdir macos-mnt
rm DDNet-macos.img

cp update.json update.json.old && mv update.json.new update.json

rm -r DDNet-$OLD_VERSION-*
Expand Down