Skip to content

Commit d93b078

Browse files
authored
Merge pull request #4 from godotengine/merge-release-templates
Merge build-templates.sh into build-release.sh
2 parents ee823e5 + 4e6b746 commit d93b078

File tree

3 files changed

+27
-79
lines changed

3 files changed

+27
-79
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,11 @@ this in a simple and user-friendly interface.
2121
containers.
2222
- Build with `build.sh` (check `--help` for usage).
2323
- Package binaries with `build-release.sh` (check `--help` for usage).
24-
- Build templates .tpz with `build-templates.sh` (check `--help` for
25-
usage).
2624

2725
Example that builds Godot 3.2-stable Classical (not Mono):
2826
```
2927
./build.sh -v 3.2-stable -g 3.2-stable -b classical
30-
./build-release.sh -v 3.2-stable -b classical
31-
./build-templates.sh -v 3.2-stable -t 3.2.stable -b classical
28+
./build-release.sh -v 3.2-stable -t 3.2.stable -b classical
3229
```
3330

3431
Again, this is intended for release managers and usability is not the

build-release.sh

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,27 @@ function sign {
2323
}
2424

2525
godot_version=""
26+
templates_version=""
2627
build_classical=1
2728
build_mono=1
2829

29-
while getopts "h?v:b:" opt; do
30+
while getopts "h?v:t:b:" opt; do
3031
case "$opt" in
3132
h|\?)
3233
echo "Usage: $0 [OPTIONS...]"
3334
echo
34-
echo " -v godot version (e.g: 3.1-alpha5) [mandatory]"
35+
echo " -v godot version (e.g: 3.2-stable) [mandatory]"
36+
echo " -t templates version (e.g. 3.2.stable) [mandatory]"
3537
echo " -b all|classical|mono (default: all)"
3638
echo
3739
exit 1
3840
;;
3941
v)
4042
godot_version=$OPTARG
4143
;;
44+
t)
45+
templates_version=$OPTARG
46+
;;
4247
b)
4348
if [ "$OPTARG" == "classical" ]; then
4449
build_mono=0
@@ -49,6 +54,11 @@ while getopts "h?v:b:" opt; do
4954
esac
5055
done
5156

57+
if [ -z "${godot_version}" -o -z "${templates_version}" ]; then
58+
echo "Mandatory argument -v or -t missing."
59+
exit 1
60+
fi
61+
5262
export basedir=$(pwd)
5363
export reldir="${basedir}/releases/${godot_version}"
5464
export reldir_mono="${reldir}/mono"
@@ -221,6 +231,13 @@ if [ "${build_classical}" == "1" ]; then
221231
cd uwp_template_x64_debug && zip -q -9 -r "${templatesdir}/uwp_x64_debug.zip" * && cd ..
222232
rm -rf uwp_template_x64*
223233

234+
## Templates TPZ (Classical) ##
235+
236+
echo "${templates_version}" > ${templatesdir}/version.txt
237+
pushd ${templatesdir}/..
238+
zip -q -9 -r -D "${reldir}/${godot_basename}_export_templates.tpz" templates/*
239+
popd
240+
224241
fi
225242

226243
# Mono
@@ -386,6 +403,13 @@ if [ "${build_mono}" == "1" ]; then
386403

387404
# Not supported yet.
388405

406+
## Templates TPZ (Mono) ##
407+
408+
echo "${templates_version}.mono" > ${templatesdir_mono}/version.txt
409+
pushd ${templatesdir_mono}/..
410+
zip -q -9 -r -D "${reldir_mono}/${godot_basename}_mono_export_templates.tpz" templates/*
411+
popd
412+
389413
fi
390414

391415
echo "All editor binaries and templates prepared successfully for release"

build-templates.sh

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)