-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathbuild.android.sh
More file actions
executable file
·36 lines (30 loc) · 822 Bytes
/
Copy pathbuild.android.sh
File metadata and controls
executable file
·36 lines (30 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
echo "Set exit on simple errors"
set -e
echo "Use dumb gradle terminal"
export TERM=dumb
rm -rf dist/package/platforms/android || true
mkdir -p dist/package/platforms/android
echo "Build android"
cd android
./gradlew --quiet assembleRelease
cd ..
cp android/widgets/build/outputs/aar/widgets-release.aar dist/package/platforms/android/widgets-release.aar
if [ "$1" ]
then
echo "Suffix package.json's version with tag: $1"
sed -i.bak 's/\(\"version\"\:[[:space:]]*\"[^\"]*\)\"/\1-'$1'"/g' ./dist/package/package.json
fi
if [ "$SKIP_PACK" ]
then
echo "SKIP pack"
else
echo "Copy NPM artefacts"
cp .npmignore LICENSE README.md package.json dist/package
echo "NPM pack"
cd dist/package
PACKAGE="$(npm pack)"
cd ../..
mv dist/package/$PACKAGE dist/$PACKAGE
echo "Output: dist/$PACKAGE"
fi