1
1
#! /bin/bash
2
2
3
3
set -e
4
+ export basedir=$( pwd)
4
5
5
6
# Config
6
7
@@ -104,23 +105,39 @@ publish_nuget_packages() {
104
105
done
105
106
}
106
107
108
+ can_publish_maven=0
109
+ if [ ! -d " ${basedir} /deps/keystore" ]; then
110
+ echo " Disabling Android library publishing as ${basedir} /deps/keystore doesn't exist."
111
+ else
112
+ can_publish_maven=1
113
+ fi
114
+
115
+ publish_maven_library () {
116
+ if [ $can_publish_maven == 0 ]; then
117
+ return
118
+ fi
119
+ # FIXME: Might be worth reworking the script to make it all sudo-safe and use appropriate users throughout.
120
+ sudo sh build-android/upload-mavencentral.sh
121
+ }
122
+
107
123
godot_version=" "
108
124
templates_version=" "
109
125
do_cleanup=1
110
126
make_tarball=1
111
127
build_classical=1
112
128
build_mono=1
113
129
publish_nuget=0
130
+ publish_maven=0
114
131
115
- while getopts " h?v:t:b:n-:" opt; do
132
+ while getopts " h?v:t:b:p: n-:" opt; do
116
133
case " $opt " in
117
134
h|\? )
118
135
echo " Usage: $0 [OPTIONS...]"
119
136
echo
120
137
echo " -v godot version (e.g: 3.2-stable) [mandatory]"
121
138
echo " -t templates version (e.g. 3.2.stable) [mandatory]"
122
139
echo " -b build target: all|classical|mono|none (default: all)"
123
- echo " -n publish nuget packages (default: false )"
140
+ echo " -p publish target: all| nuget|maven|none (default: none )"
124
141
echo " --no-cleanup disable deleting pre-existing output folders (default: false)"
125
142
echo " --no-tarball disable generating source tarball (default: false)"
126
143
echo
@@ -142,8 +159,15 @@ while getopts "h?v:t:b:n-:" opt; do
142
159
build_mono=0
143
160
fi
144
161
;;
145
- n)
146
- publish_nuget=1
162
+ p)
163
+ if [ " $OPTARG " == " nuget" ]; then
164
+ publish_nuget=1
165
+ elif [ " $OPTARG " == " maven" ]; then
166
+ publish_maven=1
167
+ elif [ " $OPTARG " == " all" ]; then
168
+ publish_nuget=1
169
+ publish_maven=1
170
+ fi
147
171
;;
148
172
-)
149
173
case " ${OPTARG} " in
@@ -172,7 +196,6 @@ elif [[ "{$templates_version}" == *"-"* ]]; then
172
196
exit 1
173
197
fi
174
198
175
- export basedir=$( pwd)
176
199
export webdir=" ${basedir} /web/${templates_version} "
177
200
export reldir=" ${basedir} /releases/${godot_version} "
178
201
export reldir_mono=" ${reldir} /mono"
@@ -515,4 +538,13 @@ if [ "${publish_nuget}" == "1" ]; then
515
538
516
539
fi
517
540
541
+ # Godot Android library
542
+
543
+ if [ " ${publish_maven} " == " 1" ]; then
544
+
545
+ echo " Publishing Android library to MavenCentral..."
546
+ publish_maven_library
547
+
548
+ fi
549
+
518
550
echo " All editor binaries and templates prepared successfully for release"
0 commit comments