mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2025-12-31 05:48:35 +03:00
Merge build-templates.sh into build-release.sh
Having the two separated was a bit redundant.
This commit is contained in:
@@ -21,14 +21,11 @@ this in a simple and user-friendly interface.
|
|||||||
containers.
|
containers.
|
||||||
- Build with `build.sh` (check `--help` for usage).
|
- Build with `build.sh` (check `--help` for usage).
|
||||||
- Package binaries with `build-release.sh` (check `--help` for usage).
|
- Package binaries with `build-release.sh` (check `--help` for usage).
|
||||||
- Build templates .tpz with `build-templates.sh` (check `--help` for
|
|
||||||
usage).
|
|
||||||
|
|
||||||
Example that builds Godot 3.2-stable Classical (not Mono):
|
Example that builds Godot 3.2-stable Classical (not Mono):
|
||||||
```
|
```
|
||||||
./build.sh -v 3.2-stable -g 3.2-stable -b classical
|
./build.sh -v 3.2-stable -g 3.2-stable -b classical
|
||||||
./build-release.sh -v 3.2-stable -b classical
|
./build-release.sh -v 3.2-stable -t 3.2.stable -b classical
|
||||||
./build-templates.sh -v 3.2-stable -t 3.2.stable -b classical
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Again, this is intended for release managers and usability is not the
|
Again, this is intended for release managers and usability is not the
|
||||||
|
|||||||
@@ -23,15 +23,17 @@ function sign {
|
|||||||
}
|
}
|
||||||
|
|
||||||
godot_version=""
|
godot_version=""
|
||||||
|
templates_version=""
|
||||||
build_classical=1
|
build_classical=1
|
||||||
build_mono=1
|
build_mono=1
|
||||||
|
|
||||||
while getopts "h?v:b:" opt; do
|
while getopts "h?v:t:b:" opt; do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
h|\?)
|
h|\?)
|
||||||
echo "Usage: $0 [OPTIONS...]"
|
echo "Usage: $0 [OPTIONS...]"
|
||||||
echo
|
echo
|
||||||
echo " -v godot version (e.g: 3.1-alpha5) [mandatory]"
|
echo " -v godot version (e.g: 3.2-stable) [mandatory]"
|
||||||
|
echo " -t templates version (e.g. 3.2.stable) [mandatory]"
|
||||||
echo " -b all|classical|mono (default: all)"
|
echo " -b all|classical|mono (default: all)"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
@@ -39,6 +41,9 @@ while getopts "h?v:b:" opt; do
|
|||||||
v)
|
v)
|
||||||
godot_version=$OPTARG
|
godot_version=$OPTARG
|
||||||
;;
|
;;
|
||||||
|
t)
|
||||||
|
templates_version=$OPTARG
|
||||||
|
;;
|
||||||
b)
|
b)
|
||||||
if [ "$OPTARG" == "classical" ]; then
|
if [ "$OPTARG" == "classical" ]; then
|
||||||
build_mono=0
|
build_mono=0
|
||||||
@@ -49,6 +54,11 @@ while getopts "h?v:b:" opt; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -z "${godot_version}" -o -z "${templates_version}" ]; then
|
||||||
|
echo "Mandatory argument -v or -t missing."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
export basedir=$(pwd)
|
export basedir=$(pwd)
|
||||||
export reldir="${basedir}/releases/${godot_version}"
|
export reldir="${basedir}/releases/${godot_version}"
|
||||||
export reldir_mono="${reldir}/mono"
|
export reldir_mono="${reldir}/mono"
|
||||||
@@ -221,6 +231,13 @@ if [ "${build_classical}" == "1" ]; then
|
|||||||
cd uwp_template_x64_debug && zip -q -9 -r "${templatesdir}/uwp_x64_debug.zip" * && cd ..
|
cd uwp_template_x64_debug && zip -q -9 -r "${templatesdir}/uwp_x64_debug.zip" * && cd ..
|
||||||
rm -rf uwp_template_x64*
|
rm -rf uwp_template_x64*
|
||||||
|
|
||||||
|
## Templates TPZ (Classical) ##
|
||||||
|
|
||||||
|
echo "${templates_version}" > ${templatesdir}/version.txt
|
||||||
|
pushd ${templatesdir}/..
|
||||||
|
zip -q -9 -r -D "${reldir}/${godot_basename}_export_templates.tpz" templates/*
|
||||||
|
popd
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mono
|
# Mono
|
||||||
@@ -386,6 +403,13 @@ if [ "${build_mono}" == "1" ]; then
|
|||||||
|
|
||||||
# Not supported yet.
|
# Not supported yet.
|
||||||
|
|
||||||
|
## Templates TPZ (Mono) ##
|
||||||
|
|
||||||
|
echo "${templates_version}.mono" > ${templatesdir_mono}/version.txt
|
||||||
|
pushd ${templatesdir_mono}/..
|
||||||
|
zip -q -9 -r -D "${reldir_mono}/${godot_basename}_mono_export_templates.tpz" templates/*
|
||||||
|
popd
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "All editor binaries and templates prepared successfully for release"
|
echo "All editor binaries and templates prepared successfully for release"
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
godot_version=""
|
|
||||||
templates_version=""
|
|
||||||
build_classical=1
|
|
||||||
build_mono=1
|
|
||||||
|
|
||||||
while getopts "h?v:t:b:" opt; do
|
|
||||||
case "$opt" in
|
|
||||||
h|\?)
|
|
||||||
echo "Usage: $0 [OPTIONS...]"
|
|
||||||
echo
|
|
||||||
echo " -v public version (e.g. 3.2-stable) [mandatory]"
|
|
||||||
echo " -t templates version (e.g. 3.2.stable) [mandatory]"
|
|
||||||
echo " -b all|classical|mono (default: all)"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
v)
|
|
||||||
godot_version=$OPTARG
|
|
||||||
;;
|
|
||||||
t)
|
|
||||||
templates_version=$OPTARG
|
|
||||||
;;
|
|
||||||
b)
|
|
||||||
if [ "$OPTARG" == "classical" ]; then
|
|
||||||
build_mono=0
|
|
||||||
elif [ "$OPTARG" == "mono" ]; then
|
|
||||||
build_classical=0
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "${godot_version}" -o -z "${templates_version}" ]; then
|
|
||||||
echo "Mandatory argument -v or -t missing."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
export basedir=$(pwd)
|
|
||||||
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 godot_basename="Godot_v${godot_version}"
|
|
||||||
|
|
||||||
# Classical
|
|
||||||
|
|
||||||
if [ "${build_classical}" == "1" ]; then
|
|
||||||
echo "${templates_version}" > ${templatesdir}/version.txt
|
|
||||||
|
|
||||||
mkdir -p ${reldir}
|
|
||||||
pushd ${templatesdir}/..
|
|
||||||
zip -q -9 -r -D "${reldir}/${godot_basename}_export_templates.tpz" templates/*
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Mono
|
|
||||||
|
|
||||||
if [ "${build_mono}" == "1" ]; then
|
|
||||||
echo "${templates_version}.mono" > ${templatesdir_mono}/version.txt
|
|
||||||
|
|
||||||
mkdir -p ${reldir_mono}
|
|
||||||
pushd ${templatesdir_mono}/..
|
|
||||||
zip -q -9 -r -D "${reldir_mono}/${godot_basename}_mono_export_templates.tpz" templates/*
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Templates archives generated successfully"
|
|
||||||
Reference in New Issue
Block a user