-
-
Notifications
You must be signed in to change notification settings - Fork 161
/
release
executable file
·28 lines (24 loc) · 989 Bytes
/
release
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
#!/bin/bash -e
if [ "x$1" == "xlocal" ]
then
echo "Local release..."
export LOCAL_MAVEN_URL="file://$(pwd)/releases"
mkdir -p releases
./gradlew clean test publish -PmavPublishToInternalRepo=true
version=$(cat manifest.gradle | grep library_version | awk '{print $3}' | tr "'" "\n" | head -n 2 | tail -n 1)
echo "released local version $version"
else
echo "Releasing on Maven Central ..."
./gradlew clean test publish -PmavSigning=true -PmavPublishToRemoteRepo=true --max-workers 1
echo "Generating Demo Apk ..."
cd examples/demoapp
./gradlew clean assembleDebug
cp app/build/outputs/apk/debug/app-debug.apk ../../speech-demo-debug.apk
cd ../..
echo "Creating GitHub Release ..."
version=$(cat manifest.gradle | grep "library_version" | tr "'" '\n' | head -n 2 | tail -n 1)
hub release create -a speech-demo-debug.apk -m "$version" "$version"
echo
echo "Done!"
echo "Visit https://oss.sonatype.org/#stagingRepositories and confirm the release"
fi