@@ -23,22 +23,27 @@ function sign {
23
23
}
24
24
25
25
godot_version=" "
26
+ templates_version=" "
26
27
build_classical=1
27
28
build_mono=1
28
29
29
- while getopts " h?v:b:" opt; do
30
+ while getopts " h?v:t: b:" opt; do
30
31
case " $opt " in
31
32
h|\? )
32
33
echo " Usage: $0 [OPTIONS...]"
33
34
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]"
35
37
echo " -b all|classical|mono (default: all)"
36
38
echo
37
39
exit 1
38
40
;;
39
41
v)
40
42
godot_version=$OPTARG
41
43
;;
44
+ t)
45
+ templates_version=$OPTARG
46
+ ;;
42
47
b)
43
48
if [ " $OPTARG " == " classical" ]; then
44
49
build_mono=0
@@ -49,6 +54,11 @@ while getopts "h?v:b:" opt; do
49
54
esac
50
55
done
51
56
57
+ if [ -z " ${godot_version} " -o -z " ${templates_version} " ]; then
58
+ echo " Mandatory argument -v or -t missing."
59
+ exit 1
60
+ fi
61
+
52
62
export basedir=$( pwd)
53
63
export reldir=" ${basedir} /releases/${godot_version} "
54
64
export reldir_mono=" ${reldir} /mono"
@@ -221,6 +231,13 @@ if [ "${build_classical}" == "1" ]; then
221
231
cd uwp_template_x64_debug && zip -q -9 -r " ${templatesdir} /uwp_x64_debug.zip" * && cd ..
222
232
rm -rf uwp_template_x64*
223
233
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
+
224
241
fi
225
242
226
243
# Mono
@@ -386,6 +403,13 @@ if [ "${build_mono}" == "1" ]; then
386
403
387
404
# Not supported yet.
388
405
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
+
389
413
fi
390
414
391
415
echo " All editor binaries and templates prepared successfully for release"
0 commit comments