mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-01-01 09:48:47 +03:00
Compare commits
12 Commits
debugsymbo
...
4.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6def3039b1 | ||
|
|
6f0a10f6f9 | ||
|
|
d2e5eab17c | ||
|
|
fb34c3ff3e | ||
|
|
e2e01f05df | ||
|
|
c9f1d801ae | ||
|
|
7cfa88aaaf | ||
|
|
c9d351ab67 | ||
|
|
e7210ecc92 | ||
|
|
5e3a9b9cdc | ||
|
|
b4613cec24 | ||
|
|
bf0dd1992c |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,6 +16,7 @@ angle.7z
|
||||
out/
|
||||
releases/
|
||||
sha512sums/
|
||||
steam/
|
||||
tmp/
|
||||
web/
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
./gradlew generateGodotEditor
|
||||
# Generate the Android editor for HorizonOS devices.
|
||||
./gradlew generateGodotHorizonOSEditor
|
||||
# Generate the Android editor for PicoOS devices.
|
||||
./gradlew generateGodotPicoOSEditor
|
||||
popd
|
||||
|
||||
mkdir -p /root/out/tools
|
||||
@@ -47,13 +49,15 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
if [ "$store_release" == "yes" ]; then
|
||||
cp bin/android_editor_builds/android_editor-android-release.apk /root/out/tools/android_editor.apk
|
||||
cp bin/android_editor_builds/android_editor-android-release.aab /root/out/tools/android_editor.aab
|
||||
# For the HorizonOS build, we only copy the apk.
|
||||
# For the HorizonOS and PicoOS builds, we only copy the apk.
|
||||
cp bin/android_editor_builds/android_editor-horizonos-release.apk /root/out/tools/android_editor_horizonos.apk
|
||||
cp bin/android_editor_builds/android_editor-picoos-release.apk /root/out/tools/android_editor_picoos.apk
|
||||
else
|
||||
cp bin/android_editor_builds/android_editor-android-debug.apk /root/out/tools/android_editor.apk
|
||||
cp bin/android_editor_builds/android_editor-android-debug.aab /root/out/tools/android_editor.aab
|
||||
# For the HorizonOS build, we only copy the apk.
|
||||
# For the HorizonOS and PicoOS build, we only copy the apk.
|
||||
cp bin/android_editor_builds/android_editor-horizonos-debug.apk /root/out/tools/android_editor_horizonos.apk
|
||||
cp bin/android_editor_builds/android_editor-picoos-debug.apk /root/out/tools/android_editor_picoos.apk
|
||||
fi
|
||||
|
||||
# Restart from a clean tarball, as we'll copy all the contents
|
||||
|
||||
@@ -11,7 +11,7 @@ export OPTIONS="production=yes use_lto=no"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export TERM=xterm
|
||||
|
||||
export IOS_SDK="17.5"
|
||||
export IOS_SDK="18.2"
|
||||
export IOS_LIPO="/root/ioscross/arm64/bin/arm-apple-darwin11-lipo"
|
||||
|
||||
rm -rf godot
|
||||
|
||||
@@ -5,7 +5,7 @@ set -e
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes debug_symbols=yes separate_debug_symbols=yes debug_paths_relative=yes"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export TERM=xterm
|
||||
|
||||
@@ -14,8 +14,6 @@ mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
dnf install -y binutils
|
||||
|
||||
# Classical
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
|
||||
@@ -5,7 +5,7 @@ set -e
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="osxcross_sdk=darwin23.6 production=yes debug_symbols=yes separate_debug_symbols=yes debug_paths_relative=yes use_volk=no vulkan_sdk_path=/root/moltenvk angle_libs=/root/angle"
|
||||
export OPTIONS="osxcross_sdk=darwin24.2 production=yes use_volk=no vulkan_sdk_path=/root/moltenvk angle_libs=/root/angle"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export TERM=xterm
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
set -e
|
||||
export basedir=$(pwd)
|
||||
|
||||
# Log output to a file automatically.
|
||||
exec > >(tee -a "out/logs/build-release") 2>&1
|
||||
|
||||
# Config
|
||||
|
||||
# For signing keystore and password.
|
||||
@@ -151,12 +154,13 @@ elif [[ "{$templates_version}" == *"-"* ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export webdir="${basedir}/web/${templates_version}"
|
||||
export reldir="${basedir}/releases/${godot_version}"
|
||||
export reldir_mono="${reldir}/mono"
|
||||
export tmpdir="${basedir}/tmp"
|
||||
export templatesdir="${tmpdir}/templates"
|
||||
export templatesdir_mono="${tmpdir}/mono/templates"
|
||||
export webdir="${basedir}/web/${templates_version}"
|
||||
export steamdir="${basedir}/steam"
|
||||
|
||||
export godot_basename="Godot_v${godot_version}"
|
||||
|
||||
@@ -164,15 +168,19 @@ export godot_basename="Godot_v${godot_version}"
|
||||
|
||||
if [ "${do_cleanup}" == "1" ]; then
|
||||
|
||||
rm -rf ${webdir}
|
||||
rm -rf ${reldir}
|
||||
rm -rf ${tmpdir}
|
||||
rm -rf ${webdir}
|
||||
rm -rf ${steamdir}
|
||||
|
||||
mkdir -p ${webdir}
|
||||
mkdir -p ${reldir}
|
||||
mkdir -p ${reldir_mono}
|
||||
mkdir -p ${templatesdir}
|
||||
mkdir -p ${templatesdir_mono}
|
||||
mkdir -p ${webdir}
|
||||
if [ -d out/windows/steam ]; then
|
||||
mkdir -p ${steamdir}
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
@@ -214,6 +222,13 @@ if [ "${build_classical}" == "1" ]; then
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
# ICU data
|
||||
if [ -f ${basedir}/git/thirdparty/icu4c/icudt_godot.dat ]; then
|
||||
cp ${basedir}/git/thirdparty/icu4c/icudt_godot.dat ${templatesdir}/icudt_godot.dat
|
||||
else
|
||||
echo "icudt_godot.dat" not found.
|
||||
fi
|
||||
|
||||
# Templates
|
||||
cp out/linux/x86_64/templates/godot.linuxbsd.template_release.x86_64 ${templatesdir}/linux_release.x86_64
|
||||
cp out/linux/x86_64/templates/godot.linuxbsd.template_debug.x86_64 ${templatesdir}/linux_debug.x86_64
|
||||
@@ -293,6 +308,20 @@ if [ "${build_classical}" == "1" ]; then
|
||||
rm -rf macos_template.app
|
||||
sign_macos_template ${templatesdir} 0
|
||||
|
||||
## Steam (Classical) ##
|
||||
|
||||
if [ -d out/windows/steam ]; then
|
||||
cp out/windows/steam/godot.windows.editor.x86_64.exe ${steamdir}/godot.windows.opt.tools.64.exe
|
||||
cp out/windows/steam/godot.windows.editor.x86_32.exe ${steamdir}/godot.windows.opt.tools.32.exe
|
||||
sign_windows ${steamdir}/godot.windows.opt.tools.64.exe
|
||||
sign_windows ${steamdir}/godot.windows.opt.tools.32.exe
|
||||
unzip ${reldir}/${godot_basename}_linux.x86_64.zip -d ${steamdir}/
|
||||
unzip ${reldir}/${godot_basename}_linux.x86_32.zip -d ${steamdir}/
|
||||
mv ${steamdir}/{${godot_basename}_linux.x86_64,godot.x11.opt.tools.64}
|
||||
mv ${steamdir}/{${godot_basename}_linux.x86_32,godot.x11.opt.tools.32}
|
||||
unzip ${reldir}/${godot_basename}_macos.universal -d ${steamdir}/
|
||||
fi
|
||||
|
||||
## Web (Classical) ##
|
||||
|
||||
# Editor
|
||||
@@ -324,6 +353,8 @@ if [ "${build_classical}" == "1" ]; then
|
||||
cp out/android/tools/android_editor.apk ${reldir}/${binname}
|
||||
binname="${godot_basename}_android_editor_horizonos.apk"
|
||||
cp out/android/tools/android_editor_horizonos.apk ${reldir}/${binname}
|
||||
binname="${godot_basename}_android_editor_picoos.apk"
|
||||
cp out/android/tools/android_editor_picoos.apk ${reldir}/${binname}
|
||||
binname="${godot_basename}_android_editor.aab"
|
||||
cp out/android/tools/android_editor.aab ${reldir}/${binname}
|
||||
|
||||
@@ -398,6 +429,13 @@ if [ "${build_mono}" == "1" ]; then
|
||||
zip -r -q -9 "${reldir_mono}/${binbasename}_arm32.zip" ${binbasename}_arm32
|
||||
rm -rf ${binbasename}_arm32
|
||||
|
||||
# ICU data
|
||||
if [ -f ${basedir}/git/thirdparty/icu4c/icudt_godot.dat ]; then
|
||||
cp ${basedir}/git/thirdparty/icu4c/icudt_godot.dat ${templatesdir_mono}/icudt_godot.dat
|
||||
else
|
||||
echo "icudt_godot.dat" not found.
|
||||
fi
|
||||
|
||||
# Templates
|
||||
cp out/linux/x86_64/templates-mono/godot.linuxbsd.template_debug.x86_64.mono ${templatesdir_mono}/linux_debug.x86_64
|
||||
cp out/linux/x86_64/templates-mono/godot.linuxbsd.template_release.x86_64.mono ${templatesdir_mono}/linux_release.x86_64
|
||||
|
||||
@@ -5,7 +5,7 @@ set -e
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes debug_symbols=yes separate_debug_symbols=yes debug_paths_relative=yes use_mingw=yes angle_libs=/root/angle mesa_libs=/root/mesa d3d12=yes"
|
||||
export OPTIONS="production=yes use_mingw=yes angle_libs=/root/angle mesa_libs=/root/mesa d3d12=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export OPTIONS_LLVM="use_llvm=yes mingw_prefix=/root/llvm-mingw"
|
||||
export TERM=xterm
|
||||
|
||||
15
build.sh
15
build.sh
@@ -4,6 +4,14 @@ set -e
|
||||
|
||||
OPTIND=1
|
||||
|
||||
export basedir="$(pwd)"
|
||||
mkdir -p ${basedir}/out
|
||||
mkdir -p ${basedir}/out/logs
|
||||
mkdir -p ${basedir}/mono-glue
|
||||
|
||||
# Log output to a file automatically.
|
||||
exec > >(tee -a "out/logs/build") 2>&1
|
||||
|
||||
# Config
|
||||
|
||||
# For default registry and number of cores.
|
||||
@@ -184,7 +192,7 @@ if [ ! -d "deps/swappy" ]; then
|
||||
echo "Missing Swappy libraries, downloading them."
|
||||
mkdir -p deps/swappy
|
||||
pushd deps/swappy
|
||||
curl -L -O https://github.com/darksylinc/godot-swappy/releases/download/v2023.3.0.0/godot-swappy.7z
|
||||
curl -L -O https://github.com/godotengine/godot-swappy/releases/download/from-source-2025-01-31/godot-swappy.7z
|
||||
7z x godot-swappy.7z && rm godot-swappy.7z
|
||||
popd
|
||||
fi
|
||||
@@ -228,11 +236,6 @@ EOF
|
||||
popd
|
||||
fi
|
||||
|
||||
export basedir="$(pwd)"
|
||||
mkdir -p ${basedir}/out
|
||||
mkdir -p ${basedir}/out/logs
|
||||
mkdir -p ${basedir}/mono-glue
|
||||
|
||||
export podman_run="${podman} run -it --rm --env BUILD_NAME=${BUILD_NAME} --env GODOT_VERSION_STATUS=${GODOT_VERSION_STATUS} --env NUM_CORES=${NUM_CORES} --env CLASSICAL=${build_classical} --env MONO=${build_mono} -v ${basedir}/godot-${godot_version}.tar.gz:/root/godot.tar.gz -v ${basedir}/mono-glue:/root/mono-glue -w /root/"
|
||||
export img_version=$IMAGE_VERSION
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf releases tmp web
|
||||
rm -rf releases steam tmp web
|
||||
|
||||
2
clean.sh
2
clean.sh
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf godot*.tar.gz mono-glue out releases tmp web
|
||||
rm -rf godot*.tar.gz mono-glue out releases steam tmp web
|
||||
git status
|
||||
|
||||
15
config.sh.in
15
config.sh.in
@@ -12,10 +12,25 @@
|
||||
# relevant tool in your PATH or an absolute path to run it from.
|
||||
export PODMAN='podman'
|
||||
|
||||
# GitHub token for @GodotBuilder for releases on godotengine/godot-builds,
|
||||
# can use a long expiry date.
|
||||
# For stable releases to godotengine/godot, generate a personal token with
|
||||
# write access to godotengine/godot for use in publish-release.sh.
|
||||
export GH_TOKEN=''
|
||||
|
||||
# Path to a Git clone of https://github.com/godotengine/godot-builds.
|
||||
# Only used for uploading official releases.
|
||||
export GODOT_BUILDS_PATH=''
|
||||
|
||||
# Path to the directory with the Steam upload setup.
|
||||
export UPLOAD_STEAM_PATH=''
|
||||
|
||||
# Path to the directory with the EGS upload setup.
|
||||
export UPLOAD_EGS_PATH=''
|
||||
|
||||
# Path to the 'butler' binary for upload of stable releases to itch.io.
|
||||
export UPLOAD_ITCH_BUTLER=''
|
||||
|
||||
# SSH hostname to upload Web editor builds to.
|
||||
# Only used for uploading official releases.
|
||||
export WEB_EDITOR_HOSTNAME=''
|
||||
|
||||
@@ -2,21 +2,28 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Log output to a file automatically.
|
||||
exec > >(tee -a "out/logs/publish-release") 2>&1
|
||||
|
||||
# Config
|
||||
|
||||
# For signing keys, and path to godot-builds repo.
|
||||
# For upload tools and signing/release keys.
|
||||
source ./config.sh
|
||||
|
||||
godot_version=""
|
||||
web_editor_latest=0
|
||||
latest_stable=0
|
||||
skip_stable=0
|
||||
draft_arg=""
|
||||
|
||||
while getopts "h?v:l" opt; do
|
||||
while getopts "h?v:lsd" opt; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
echo "Usage: $0 [OPTIONS...]"
|
||||
echo
|
||||
echo " -v godot version (e.g: 3.2-stable) [mandatory]"
|
||||
echo " -l mark web editor as latest"
|
||||
echo " -l latest stable release (web editor, itch.io, EGS)"
|
||||
echo " -s don't run stable specific steps"
|
||||
echo " -d publish as draft release on GitHub"
|
||||
echo
|
||||
exit 1
|
||||
;;
|
||||
@@ -24,7 +31,13 @@ while getopts "h?v:l" opt; do
|
||||
godot_version=$OPTARG
|
||||
;;
|
||||
l)
|
||||
web_editor_latest=1
|
||||
latest_stable=1
|
||||
;;
|
||||
s)
|
||||
skip_stable=1
|
||||
;;
|
||||
d)
|
||||
draft_arg="-d"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -34,6 +47,9 @@ if [ -z "${godot_version}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
basedir=$(pwd)
|
||||
reldir=${basedir}/releases/${godot_version}
|
||||
|
||||
# Confirm
|
||||
|
||||
IFS=- read version status <<< "${godot_version}"
|
||||
@@ -46,26 +62,109 @@ case "$choice" in
|
||||
esac
|
||||
template_version=${version}.${status}
|
||||
|
||||
# Config checks for stable releases.
|
||||
|
||||
if [ "${status}" == "stable" -a "${skip_stable}" == "0" ]; then
|
||||
echo "Publishing a stable release. Checking that configuration is valid to perform stable release specific steps."
|
||||
|
||||
read -p "Enter personal access token (GH_TOKEN) for godotengine/godot: " personal_gh_token
|
||||
if [[ "${personal_gh_token}" != "github_pat_"* ]]; then
|
||||
echo "Provided personal access token should start with 'github_pat', aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! gh api repos/godotengine/godot/git/refs/tags | grep -q ${godot_version}; then
|
||||
echo "The tag '${godot_version}' does not exist in godotengine/godot, aborting."
|
||||
echo "Push commits and create it manually before running this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "${UPLOAD_STEAM_PATH}" ]; then
|
||||
echo "Invalid config.sh: UPLOAD_STEAM_PATH is not a directory, aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${latest_stable}" == "1" ]; then
|
||||
if [ ! -d "${UPLOAD_EGS_PATH}" ]; then
|
||||
echo "Invalid config.sh: UPLOAD_EGS_PATH is not a directory, aborting."
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -x "${UPLOAD_ITCH_BUTLER}" ]; then
|
||||
echo "Invalid config.sh: UPLOAD_ITCH_BUTLER does not point to an executable, aborting."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Upload to GitHub godot-builds
|
||||
|
||||
echo "Uploading release to to godotengine/godot-builds repository."
|
||||
|
||||
if [ -z "${GODOT_BUILDS_PATH}" ]; then
|
||||
echo "Missing path to godotengine/godot-builds clone in config.sh, necessary to upload releases. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${GODOT_BUILDS_PATH}/tools/upload-github.sh -v ${version} -f ${status}
|
||||
${GODOT_BUILDS_PATH}/tools/upload-github.sh -v ${version} -f ${status} ${draft_arg}
|
||||
|
||||
# Web editor
|
||||
# Stable release only
|
||||
|
||||
scp -P 22 -r web/${template_version} ${WEB_EDITOR_HOSTNAME}:/home/akien/web_editor/
|
||||
sleep 2
|
||||
command="sudo mv /home/akien/web_editor/${template_version} /var/www/editor.godotengine.org/public/releases/"
|
||||
command="${command}; cd /var/www/editor.godotengine.org; sudo chown -R www-data:www-data public/releases/${template_version}"
|
||||
command="${command}; sudo ./create-symlinks.sh -v ${template_version}"
|
||||
if [ $web_editor_latest == 1 ]; then
|
||||
command="${command} -l"
|
||||
if [ "${status}" == "stable" -a "${skip_stable}" == "0" ]; then
|
||||
namever=Godot_v${godot_version}
|
||||
|
||||
echo "Uploading stable release to main GitHub repository."
|
||||
|
||||
export GH_TOKEN=${personal_gh_token}
|
||||
pushd git
|
||||
# Get release details from existing godot-builds release.
|
||||
release_info=$(gh release view ${godot_version} --repo godotengine/godot-builds --json name,body)
|
||||
release_title=$(echo "$release_info" | jq -r '.name')
|
||||
release_desc=$(echo "$release_info" | jq -r '.body')
|
||||
|
||||
gh release create ${godot_version} --repo godotengine/godot --title "$release_title" --notes "$release_desc" ${draft_arg}
|
||||
gh release upload ${godot_version} ${reldir}/[Gg]* ${reldir}/mono/[Gg]*
|
||||
# Concatenate SHA sums.
|
||||
cp ${reldir}/SHA512-SUMS.txt .
|
||||
cat ${reldir}/mono/SHA512-SUMS.txt >> SHA512-SUMS.txt
|
||||
gh release upload ${godot_version} SHA512-SUMS.txt
|
||||
rm SHA512-SUMS.txt
|
||||
popd
|
||||
|
||||
echo "Uploading stable release to Steam."
|
||||
|
||||
pushd ${UPLOAD_STEAM_PATH}
|
||||
rm -rf content/bin/[Gg]*
|
||||
rm -rf content/editor_data/export_templates/*
|
||||
cp -f ${basedir}/git/*.{md,txt,png,svg} content/
|
||||
# Steam specific binaries prepared by build-release.sh
|
||||
cp -r ${basedir}/steam/[Gg]* content/bin/
|
||||
unzip ${reldir}/${namever}_export_templates.tpz -d content/editor_data/export_templates/
|
||||
mv content/editor_data/export_templates/{templates,${template_version}}
|
||||
steam_build/build.sh
|
||||
popd
|
||||
|
||||
if [ "${latest_stable}" == "1" ]; then
|
||||
echo "Uploading stable release to EGS (latest only)."
|
||||
|
||||
pushd ${UPLOAD_EGS_PATH}
|
||||
rm -rf buildroot-*/*
|
||||
unzip ${reldir}/${namever}_win64.exe.zip -d buildroot-win64/
|
||||
unzip ${reldir}/${namever}_win32.exe.zip -d buildroot-win32/
|
||||
unzip ${reldir}/${namever}_macos.universal.zip -d buildroot-macos/
|
||||
./upload.sh -v ${godot_version}
|
||||
popd
|
||||
|
||||
echo "Uploading stable release to itch.io (latest only)."
|
||||
|
||||
${UPLOAD_ITCH_BUTLER} push ${reldir}/${namever}_linux.x86_64.zip godotengine/godot:linux-64-stable --userversion ${godot_version}
|
||||
${UPLOAD_ITCH_BUTLER} push ${reldir}/${namever}_linux.x86_32.zip godotengine/godot:linux-32-stable --userversion ${godot_version}
|
||||
${UPLOAD_ITCH_BUTLER} push ${reldir}/${namever}_win64.exe.zip godotengine/godot:windows-64-stable --userversion ${godot_version}
|
||||
${UPLOAD_ITCH_BUTLER} push ${reldir}/${namever}_win32.exe.zip godotengine/godot:windows-32-stable --userversion ${godot_version}
|
||||
${UPLOAD_ITCH_BUTLER} push ${reldir}/${namever}_macos.universal.zip godotengine/godot:osx-64-stable --userversion ${godot_version}
|
||||
fi
|
||||
|
||||
echo "All stable release upload steps done."
|
||||
fi
|
||||
ssh -P 22 ${WEB_EDITOR_HOSTNAME} "${command}"
|
||||
|
||||
# NuGet packages
|
||||
|
||||
@@ -91,8 +190,40 @@ else
|
||||
echo "Disabling Android library publishing as deps/keystore doesn't exist."
|
||||
fi
|
||||
|
||||
# Stable release only
|
||||
# Web editor
|
||||
|
||||
if [ "${status}" == "stable" ]; then
|
||||
echo "NOTE: This script doesn't handle yet uploading stable releases to the main GitHub repository, Steam, EGS, and itch.io."
|
||||
echo "Uploading web editor... (with retry logic as it can be flaky)"
|
||||
|
||||
MAX_RETRIES=5
|
||||
delay=5
|
||||
|
||||
retry_command() {
|
||||
local attempt=1
|
||||
local cmd=$1
|
||||
while [ ${attempt} -le ${MAX_RETRIES} ]; do
|
||||
echo "Attempt ${attempt}: Running command..."
|
||||
eval "${cmd}" && return 0 # Success
|
||||
|
||||
echo "Command failed. Retrying in ${delay} seconds..."
|
||||
sleep ${delay}
|
||||
((attempt++))
|
||||
delay=$((delay * 2)) # Exponential backoff
|
||||
done
|
||||
|
||||
echo "❌ Command failed after ${MAX_RETRIES} attempts."
|
||||
return 1
|
||||
}
|
||||
|
||||
command="sudo mv /home/akien/web_editor/${template_version} /var/www/editor.godotengine.org/public/releases/"
|
||||
command="${command}; cd /var/www/editor.godotengine.org; sudo chown -R www-data:www-data public/releases/${template_version}"
|
||||
command="${command}; sudo ./create-symlinks.sh -v ${template_version}"
|
||||
if [ "${latest_stable}" == "1" ]; then
|
||||
echo "Marking web editor build as 'latest'."
|
||||
command="${command} -l"
|
||||
fi
|
||||
|
||||
retry_command "scp -P 22 -r web/${template_version} ${WEB_EDITOR_HOSTNAME}:/home/akien/web_editor/"
|
||||
sleep 2
|
||||
retry_command "ssh -p 22 ${WEB_EDITOR_HOSTNAME} '${command}'"
|
||||
|
||||
echo "All publishing steps done. Check out/logs/publish-release to double check that all steps succeeded."
|
||||
|
||||
Reference in New Issue
Block a user