X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=misc%2Ftools%2Fxonotic-map-compiler-autobuild;h=5c6db64de23a62450129bfe934511064b0d6b204;hp=4733758c57d68e019ad98d6a65b02d2dbbdc31db;hb=98926ac7e5917c2d6f8ed5b4dd3e5d48d8510a9d;hpb=698645d6b5a2c7d0d651e3e2b3ca2b196772445e diff --git a/misc/tools/xonotic-map-compiler-autobuild b/misc/tools/xonotic-map-compiler-autobuild index 4733758c..5c6db64d 100755 --- a/misc/tools/xonotic-map-compiler-autobuild +++ b/misc/tools/xonotic-map-compiler-autobuild @@ -3,12 +3,12 @@ set -e bspdir="$PWD/data" -http_url=http://beta.xonotic.org/autobuild-bsp/ +url_http=http://beta.xonotic.org/autobuild-bsp/ url_ssh=xonotic-beta:autobuild-bsp/ build_cachedir="$HOME/xonotic-map-compiler.cache/" screenshot_cachedir="$HOME/xonotic-map-screenshot.cache/" build_override="-bsp_timeout 900 -vis_timeout 3600 -light_timeout 14400 -minimap_timeout 900 -scale_timeout 900" -screenshot_override="9 300" +screenshot_override="9 600 +g_ctf 1" getthemap_fail=false @@ -198,13 +198,16 @@ screenshotthemap() ) if ! mv ~/.xonotic/data/screenshots "$M-$blobhash"; then if [ -n "$IRCSPAM" ]; then - ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" 1 > "maps/$M.ircss" + #ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" 1 > "maps/$M.ircss" + ss2spam "$M" "$url?d" "$REFNAME" "$HASH" 1 > "maps/$M.ircss" fi return 1 fi if [ -n "$IRCSPAM" ]; then - ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" 0 > "maps/$M.ircss" + #ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" 0 > "maps/$M.ircss" + ss2spam "$M" "$url?d" "$REFNAME" "$HASH" 0 > "maps/$M.ircss" fi + chmod 1777 "$M-$blobhash" ln -snf "../$M-$blobhash" "$M" # from ALL branches, so beware! rsync -vaSHP "$M-$blobhash" "$url_ssh" rsync -vaSHP "$M" "$url_ssh""latest/" @@ -243,13 +246,18 @@ case "$1" in build) cd data/xonotic-maps.pk3dir git for-each-ref 'refs/remotes' | while read -r HASH TYPE REFNAME; do + case "$REFNAME" in + */archived/*) + continue + ;; + esac if [ -f "$build_cachedir/$HASH" ]; then continue fi git reset --hard git clean -xfd git checkout -f "$HASH" - allmaps buildthemap "$REFNAME" "$HASH" "$http_url" + allmaps buildthemap "$REFNAME" "$HASH" "$url_http" touch "$build_cachedir/$HASH" done git checkout -f master @@ -257,15 +265,30 @@ case "$1" in screenshot) cd data/xonotic-maps.pk3dir git for-each-ref 'refs/remotes' | while read -r HASH TYPE REFNAME; do + case "$REFNAME" in + */archived/*) + continue + ;; + esac if [ -f "$screenshot_cachedir/$HASH" ]; then continue fi git reset --hard git clean -xfd git checkout -f "$HASH" - allmaps getthemap "$http_url" "$bspdir.old" "$bspdir" + + cd ../.. + mkdir -p "$bspdir" "$bspdir.old" + for b in "$bspdir"/*-????????????????????????????????????????-????????????????????????????????????????.pk3; do + if [ -e "$b" ]; then + mv "$b" "$bspdir.old"/ + fi + done + cd data/xonotic-maps.pk3dir + allmaps getthemap "$url_http" "$bspdir.old" "$bspdir" + if ! $getthemap_fail; then - allmaps screenshotthemap "$REFNAME" "$HASH" "$http_url" + allmaps screenshotthemap "$REFNAME" "$HASH" "$url_http" touch "$screenshot_cachedir/$HASH" fi done @@ -279,7 +302,7 @@ case "$1" in fi done cd data/xonotic-maps.pk3dir - allmaps getthemap "$http_url" "$bspdir.old" "$bspdir" + allmaps getthemap "$url_http" "$bspdir.old" "$bspdir" echo "List of maps that got deleted (if any) and currently are in $bspdir.old:" ls -l "$bspdir.old" ;; @@ -287,7 +310,7 @@ case "$1" in mkdir -p "$bspdir" cd "$bspdir" rm -f *-????????????????????????????????????????-????????????????????????????????????????.pk3 - wget -r -l1 -A "*.pk3" -N --no-parent --no-directories "$http_url""latest" + wget -r -l1 -A "*.pk3" -N --no-parent --no-directories "$url_http""latest" ;; log2spam-test) log2spam "mapname" "http://mapurl" "branch" "commit" "0"