-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
release
executable file
·25 lines (19 loc) · 715 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
#!/bin/bash -e
echo "Releasing on Maven Central ..."
./gradlew clean test publish -PmavSigning=true -PmavPublishToRemoteRepo=true --max-workers 1
version=$(cat manifest.gradle | grep "library_version" | tr "'" '\n' | head -n 2 | tail -n 1)
function generate-debug-apk {
rm -rf *.apk
cd app
./gradlew clean assembleDebug
cp demo/build/outputs/apk/debug/demo-debug.apk ../"recycler-adapter-demo-debug-$version.apk"
cd ..
}
echo "Generating Demo Apk ..."
generate-debug-apk
APK=$(ls *.apk | head -n 1)
echo "Creating GitHub Release ..."
hub release create -a "$APK" -m "$version" "$version"
echo
echo "Done!"
echo "Visit https://oss.sonatype.org/#stagingRepositories and confirm the release"