diff --git a/.gitignore b/.gitignore index 33098fe..582f889 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ # Built application files *.apk -!/simpledialogfragment_demo_v2.4.apk *.ap_ # Files for the ART/Dalvik VM diff --git a/README.md b/README.md index 71ef649..5347669 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ A new approach of result handling ensures data integrity over rotation changes, [Version history and JavaDoc API](https://eltos.github.io/SimpleDialogFragments/) [Screenshots](https://github.com/eltos/SimpleDialogFragments/wiki/Showcase) -[Demo APK](https://github.com/eltos/SimpleDialogFragments/releases/download/v2.4/simpledialogfragments_testApp_v2.4.apk) +[Demo APK](https://github.com/eltos/SimpleDialogFragments/releases/download/v3.1/testApp.apk) ### Features diff --git a/publish b/publish index 8db8d24..ca4f596 100755 --- a/publish +++ b/publish @@ -17,6 +17,9 @@ ## - Update version code in build.gradle! ## ## - Run +## $ ./gradlew :testApp:assembleRelease +## +## - Run ## $ ./gradlew clean build install ## This may fail during javadoc generation. However, the javadoc will most likely have been ## generated in simpledialogfragment/build/docs/javadoc/ @@ -28,6 +31,7 @@ ############################################################################## + # Check for config in local.properties ###################################### if ! grep -q "^bintray.user=" "local.properties" || @@ -57,6 +61,22 @@ if [[ $OK =~ ^[Nn].*$ ]]; then fi +# Assemble testApp +################## +echo "Assemble testApp..." +APP="testApp/build/outputs/apk/debug/testApp-debug.apk" +rm -f "$APP" +./gradlew :testApp:assembleDebug +if [ -f "$APP" ]; then + cp -f "$APP" "testApp.apk" + echo -e "\e[32mtestApp created\e[0m" +else + echo -e "\e[31mtestApp not created!\e[0m" + exit 1 +fi + + + # Build ####### echo "Clean, build and install..." @@ -110,13 +130,15 @@ if [ $BUILD -eq 0 ]; then if [ $? -eq 0 ]; then # Update README.md - sed -i 's/:simpledialogfragment:[0-9.]*/:simpledialogfragment:'"$LVN"'/' README.md + sed -i 's|:simpledialogfragment:[0-9.]*|:simpledialogfragment:'"$LVN"'|' README.md + sed -i 's|releases/download/v[0-9.]*/|releases/download/v'"$AVN"'/|' README.md echo -e "\e[32mSUCCESS :)\e[0m" echo "You still need to publish the files uploaded." xdg-open https://bintray.com/eltos/simpledialogfragments/SimpleDialogFragment else echo -e "\e[31mUpload failed :(\e[0m" + exit 1 fi fi else