]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
rsync: support updating the mappingsupport package, reduce timestamp noise
authorbones_was_here <bones_was_here@xonotic.au>
Sun, 23 Mar 2025 00:40:44 +0000 (10:40 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sun, 23 Mar 2025 01:06:39 +0000 (11:06 +1000)
The mappingsupport package has been available via rsync for years but it
didn't include the updater and wasn't recognised by it.

It also lacked the license (now required by the updater).

misc/tools/all/release.subr
misc/tools/rsync-updater/update-to-autobuild.sh

index 62334a3188f8091921ca9d8e77b10b0461540e59..e1161e6d1e7a0a0143964e218cfced1c3b8b44e2 100644 (file)
@@ -306,13 +306,13 @@ case "$cmd" in
                arch=$1
                buildpath=$2
                targetdir=$3
-               verbose mkdir -p "$targetdir"
+               # TODO: cache the dlls and skip rebuilding them if their package versions are unchanged
                (
                        cd "$d0/misc/buildsrc"
                        verbose ./dlls.sh clean "$buildpath"
                        verbose ./dlls.sh all "$buildpath" "$arch"
                )
-               verbose cp -v $buildpath/out/$arch/* "$targetdir"
+               verbose cp -r --preserve=timestamps -v "$buildpath/out/$arch" "$targetdir"
 
                # SDL2
                verbose mkdir -p "$d0/misc/builddeps/$arch/"
@@ -351,7 +351,7 @@ case "$cmd" in
                        # macOS prefers dylibs be marked executable (this one has no file extension)
                        verbose chmod 755 SDL2/SDL2.framework/Versions/Current/SDL2
                )
-               cp -R "$d0/misc/builddeps/osx/SDL2/SDL2.framework" Xonotic/Xonotic.app/Contents/Frameworks/
+               cp -R --preserve=timestamps "$d0/misc/builddeps/osx/SDL2/SDL2.framework" Xonotic/Xonotic.app/Contents/Frameworks/
                ;;
        release-libs)
                release_common
@@ -671,6 +671,8 @@ case "$cmd" in
                        Xonotic/data/xonotic-$pk3stamp-nexcompat-high.pk3 \
                        Xonotic/data/xonotic-$pk3stamp-xoncompat-high.pk3
                verbose mkzipr Xonotic-$stamp-mappingsupport.zip \
+                       Xonotic/misc/tools/rsync-updater/ \
+                       Xonotic/COPYING Xonotic/GPL-2 Xonotic/GPL-3 \
                        Xonotic/mapping
                verbose mkzip0 Xonotic-$stamp-mappingsupport.zip \
                        Xonotic/data/xonotic-$pk3stamp-maps-mapping.pk3
@@ -684,7 +686,7 @@ case "$cmd" in
                verbose "$d0"/misc/tools/msys2-linux.sh --schroot=sid rsync dash openssl sed
                targetroot="$PWD/Xonotic"
                verbose cd "$HOME/msys64" # see msys2-linux.sh
-               verbose cp --parents \
+               verbose cp --parents --preserve=timestamps \
                        usr/bin/msys-2.0.dll \
                        usr/bin/msys-crypto-3.dll \
                        usr/bin/msys-iconv-2.dll \
@@ -699,7 +701,7 @@ case "$cmd" in
                        usr/ssl/cert.pem \
                        "$targetroot/misc/tools/rsync-updater/"
                # msys2 sh.exe is currently bash
-               verbose cp usr/bin/dash.exe "$targetroot/misc/tools/rsync-updater/usr/bin/sh.exe"
+               verbose cp --preserve=timestamps usr/bin/dash.exe "$targetroot/misc/tools/rsync-updater/usr/bin/sh.exe"
                ;;
        release)
                release_common
index 16a9f9a629fad81d893c25eccc180d843ddb956b..43e2fa538a1452befbdfca14e81de7cd2ae1bcc4 100755 (executable)
@@ -65,6 +65,9 @@ elif PWD="${PWD%/}" && [ "$PWD" != "${PWD%/misc/tools/rsync-updater}" ]; then
                package="Xonotic-high"
        elif [ -f ../../../data/xonotic-*-data.pk3 ]; then
                echo "Found Xonotic data files"
+       elif [ -f ../../../data/xonotic-*-maps-mapping.pk3 ]; then
+               echo "Found Xonotic-mappingsupport files"
+               package="Xonotic-mappingsupport"
        else
                printf "\033[1;31mNOTE: found misc/tools/rsync-updater parent directories but no data files!\033[m\n"
        fi