fix release script errors and that running it finds

This commit is contained in:
Eric House 2017-01-18 21:27:48 -08:00
parent f5ebee89da
commit 43e8c3ea64
16 changed files with 43 additions and 184 deletions

View file

@ -102,7 +102,7 @@ android {
release { release {
signingConfig signingConfigs.release signingConfig signingConfigs.release
debuggable false debuggable false
minifyEnabled true minifyEnabled false // PENDING
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
debug { debug {

View file

@ -25,7 +25,7 @@ import android.os.Handler;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.widget.TextView; import android.widget.TextView;
class ExpiringTextView extends TextView { public class ExpiringTextView extends TextView {
private ExpiringDelegate m_delegate = null; private ExpiringDelegate m_delegate = null;
private Context m_context; private Context m_context;

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_version">4.4.115</string> <string name="app_version" translatable="false">4.4.115</string>
</resources> </resources>

View file

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Resources in this file do not require localization --> <!-- Resources in this file do not require localization -->
<resources> <resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation"
>
<!-- prefs keys --> <!-- prefs keys -->
<string name="key_color_tiles">key_color_tiles</string> <string name="key_color_tiles">key_color_tiles</string>
<string name="key_show_arrow">key_show_arrow</string> <string name="key_show_arrow">key_show_arrow</string>

View file

@ -1,5 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<resources> <resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation"
>
<!-- What is \u200C? English strings are used as keys, so they all <!-- What is \u200C? English strings are used as keys, so they all
need to be unique. This glyph is non-printing and of need to be unique. This glyph is non-printing and of
zero-width, so it should do the trick: zero-width, so it should do the trick:

View file

@ -13,7 +13,9 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<resources> <resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation"
>
<string name="button_new_game">Afegeix una partida</string> <string name="button_new_game">Afegeix una partida</string>
<string name="list_item_config">Configuració de la partida…</string> <string name="list_item_config">Configuració de la partida…</string>
<string name="list_item_delete">Suprimeix</string> <string name="list_item_delete">Suprimeix</string>

View file

@ -13,7 +13,9 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<resources> <resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation"
>
<string name="button_new_game">Přidat hru</string> <string name="button_new_game">Přidat hru</string>
<string name="list_item_config">Konfigurovat</string> <string name="list_item_config">Konfigurovat</string>
<string name="list_item_delete">Vymazat</string> <string name="list_item_delete">Vymazat</string>

View file

@ -1,5 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<resources><string name="button_new_game">Spiel hinzufügen</string> <resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation"
>
<string name="button_new_game">Spiel hinzufügen</string>
<string name="button_new_group">Gruppe hinzufügen</string> <string name="button_new_group">Gruppe hinzufügen</string>
<string name="str_game_name_fmt">%1$s (%2$s)</string> <string name="str_game_name_fmt">%1$s (%2$s)</string>

View file

@ -1,5 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<resources> <resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation"
>
<!-- What is \u200C? English strings are used as keys, so they all <!-- What is \u200C? English strings are used as keys, so they all
need to be unique. This glyph is non-printing and of need to be unique. This glyph is non-printing and of
zero-width, so it should do the trick: zero-width, so it should do the trick:

View file

@ -1,5 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<resources><string name="button_new_game">ゲームを追加</string> <resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation"
>
<string name="button_new_game">ゲームを追加</string>
<string name="button_new_group">グループを追加</string> <string name="button_new_group">グループを追加</string>
<string name="str_game_name_fmt">%1$s (%2$s)</string> <string name="str_game_name_fmt">%1$s (%2$s)</string>

View file

@ -1,5 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<resources> <resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation"
>
<string name="button_new_game">Nieuw spel</string> <string name="button_new_game">Nieuw spel</string>
<string name="button_new_group">Nieuwe groep</string> <string name="button_new_group">Nieuwe groep</string>
<string name="str_game_name_fmt">%1$s (%2$s)</string> <string name="str_game_name_fmt">%1$s (%2$s)</string>

View file

@ -1,6 +1,8 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<!-- -*- compile-command: "cd ../../; ant install"; -*- --> <!-- -*- compile-command: "cd ../../; ant install"; -*- -->
<resources> <resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation"
>
<!-- <!--
############################################################ ############################################################
# :Screens: # :Screens:

View file

@ -1,5 +1,7 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<resources> <resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation"
>
<!-- Text of menuitem in main games-list screen's menu --> <!-- Text of menuitem in main games-list screen's menu -->
<string name="button_new_game">Pridať hru</string> <string name="button_new_game">Pridať hru</string>
<!-- Used to format game name plus some other information as the <!-- Used to format game name plus some other information as the

View file

@ -52,13 +52,13 @@ cd BUILD
git checkout ${TAG}${BRANCH} git checkout ${TAG}${BRANCH}
cd ./xwords4/android/ cd ./xwords4/android/
./scripts/arelease.sh --apk-list $OUT_FILE ./scripts/arelease.sh --apk-list $OUT_FILE
mkdir -p /tmp/releases_${VARIANT} mkdir -p /tmp/releases
cp *.apk /tmp/releases_${VARIANT} cp app/build/outputs/apk/*.apk /tmp/releases
if [ -n "$XW_RELEASE_SCP_DEST" ]; then if [ -n "$XW_RELEASE_SCP_DEST" ]; then
cat $OUT_FILE | while read APK; do cat $OUT_FILE | while read APK; do
echo "running: scp /tmp/releases_${VARIANT}/$APK $XW_RELEASE_SCP_DEST ..." echo "running: scp /tmp/releases/$APK $XW_RELEASE_SCP_DEST ..."
scp /tmp/releases_${VARIANT}/$APK $XW_RELEASE_SCP_DEST scp /tmp/releases/$APK $XW_RELEASE_SCP_DEST
done done
fi fi

View file

@ -5,38 +5,29 @@ set -u -e
TAGNAME="" TAGNAME=""
FILES="" FILES=""
LIST_FILE='' LIST_FILE=''
VARIANT="XWords4"
XW_WWW_PATH=${XW_WWW_PATH:-""} XW_WWW_PATH=${XW_WWW_PATH:-""}
XW_RELEASE_SCP_DEST=${XW_RELEASE_SCP_DEST:-""} XW_RELEASE_SCP_DEST=${XW_RELEASE_SCP_DEST:-""}
usage() { usage() {
echo "Error: $*" >&2 echo "Error: $*" >&2
echo "usage: $0 [--tag <name>] [--variant variant] [--apk-list path/to/out.txt] [<package-unsigned.apk>]" >&2 echo "usage: $0 [--tag <name>] [--apk-list path/to/out.txt] [<package-unsigned.apk>]" >&2
exit 1 exit 1
} }
do_build() { do_build() {
WD=$(pwd) WD=$(pwd)
cd $(dirname $0)/../${VARIANT}/ cd $(dirname $0)/../
rm -rf bin/ gen/ rm -rf bin/ gen/
ant clean release ./gradlew clean assembleXw4Rel
cd $WD cd $WD
} }
if [ -f ./AndroidManifest.xml ]; then # we're in the right directory
VARIANT=$(basename $(pwd))
fi
while [ "$#" -gt 0 ]; do while [ "$#" -gt 0 ]; do
case $1 in case $1 in
--tag) --tag)
TAGNAME=$2 TAGNAME=$2
git describe $TAGNAME || usage "$TAGNAME not a valid git tag" git describe $TAGNAME || usage "$TAGNAME not a valid git tag"
shift shift
;;
--variant)
VARIANT=$2
shift
;; ;;
--apk-list) --apk-list)
LIST_FILE=$2 LIST_FILE=$2
@ -67,28 +58,7 @@ fi
if [ -z "$FILES" ]; then if [ -z "$FILES" ]; then
do_build do_build
FILES=$(ls $(dirname $0)/../*/bin/*-unsigned.apk)
if [ -z "$FILES" ]; then
echo "unable to find any unsigned packages" >&2
usage
fi fi
fi
for PACK_UNSIGNED in $FILES; do
PACK_SIGNED=$(basename $PACK_UNSIGNED)
echo "base: $PACK_SIGNED" >&2
PACK_SIGNED=${PACK_SIGNED/-unsigned}
echo "signed: $PACK_SIGNED" >&2
jarsigner -verbose -digestalg SHA1 -keystore ~/.keystore $PACK_UNSIGNED mykey
rm -f $PACK_SIGNED
zipalign -v 4 $PACK_UNSIGNED $PACK_SIGNED
[ -n "$XW_WWW_PATH" ] && cp $PACK_SIGNED $XW_WWW_PATH
TARGET="${PACK_SIGNED%.apk}_$(git rev-parse --verify HEAD)_$(git describe).apk"
cp $PACK_SIGNED "${TARGET}"
echo "created ${TARGET}" >&2
[ -n "$LIST_FILE" ] && echo ${TARGET} >> $LIST_FILE
done
if [ -n "$TAGNAME" ]; then if [ -n "$TAGNAME" ]; then
git stash pop git stash pop

View file

@ -1,133 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<target name="my-pre-clean">
<exec dir="." executable="../scripts/rm-non-git.sh" output="/dev/null"
failonerror="true" >
<arg value="--except" />
<arg value="./local.properties" />
</exec>
<exec dir="." executable="../scripts/ndksetup.sh" output="/dev/null"
failonerror="true" >
<arg value="--with-clang"/>
</exec>
</target>
<target name="my-pre-build">
<exec dir="." executable="../scripts/key-setup.sh" failonerror="true"
>
<arg value="${build.target}"/>
</exec>
<exec dir="." executable="../scripts/ndksetup.sh" output="/dev/null"
failonerror="true" >
<arg value="--with-clang"/>
</exec>
<exec dir="." executable="../scripts/ndkbuild.sh" failonerror="true">
<arg value="BUILD_TARGET=${build.target}" />
<arg value="-j3"/>
<arg value="INITIAL_CLIENT_VERS=${INITIAL_CLIENT_VERS}" />
<arg value="VARIANT=${VARIANT_NAME}" />
<arg value="V=1" />
</exec>
<exec dir="." executable="../scripts/mkimages.sh"
failonerror="true" output="/dev/null"
/>
<exec dir="." executable="../scripts/copy-strings.py"
failonerror="true" output="/dev/null"
>
<arg value="-k"/>
<arg value="${SKIP_LANGS}"/>
</exec>
<exec dir="." executable="../scripts/mk_xml.py"
failonerror="true"
>
<arg value="-o"/>
<arg value="src/org/eehouse/android/${VARIANT_NAME}/loc/LocIDsData.java"/>
<arg value="-t"/>
<arg value="${build.target}"/>
<arg value="-v"/>
<arg value="${VARIANT_NAME}"/>
</exec>
<exec dir="." executable="../scripts/genvers.sh" output="/dev/null"
failonerror="true">
<arg value="--variant" />
<arg value="${VARIANT_NAME}" />
<arg value="--client-vers" />
<arg value="${INITIAL_CLIENT_VERS}" />
<arg value="--vers-outfile" />
<arg value="./assets/gitvers.txt" />
<arg value="--widir-enabled" />
<arg value="${WIDIR_ENABLED}" />
</exec>
</target>
<target name="my-copy-src">
<exec dir="." executable="../scripts/mkvariant.sh" failonerror="true"
output="/dev/null">
<arg value="--variant-name"/>
<arg value="${VARIANT_NAME}"/>
<arg value="--app-name"/>
<arg value="${APP_NAME}"/>
<arg value="--dest-dir"/>
<arg value="./res"/>
<arg value="--dest-dir"/>
<arg value="./src"/>
<arg value="--dest-dir"/>
<arg value="./jni"/>
<arg value="--dest-dir"/>
<arg value="./assets"/>
<arg value="--dest-dir"/>
<arg value="./libs"/>
<arg value="--dest-dir"/>
<arg value="./img_src"/>
<arg value="--dest-dir"/>
<arg value="./res_src"/>
</exec>
</target>
<!-- For some reason project.properties is suddenly getting
removed by clean and not regenerated. So make sure it's
there. -->
<target name="my-check-props">
<exec executable="../scripts/setup_local_props.sh" />
</target>
<target name="my-pre-compile">
<copy file="./gen/org/eehouse/android/${VARIANT_NAME}/R.java" todir="archive"/>
<exec dir="." executable="../scripts/fake_locales.py" failonerror="true">
<arg value="-l" />
<arg value="ba_CK" />
<arg value="-o" />
<arg value="res_src/values-ba_CK/strings.xml" />
</exec>
<exec dir="." executable="../scripts/fake_locales.py" failonerror="true">
<arg value="-l" />
<arg value="ca_PS" />
<arg value="-o" />
<arg value="res_src/values-ca_PS/strings.xml" />
</exec>
</target>
<target name="-post-build" >
<if condition="${build.is.packaging.debug}">
<then>
<exec executable="git" outputproperty="git-rev" >
<arg value="describe" />
</exec>
<copy file="bin/XWords4-debug.apk" tofile="XWords4-debug-${git-rev}.apk"/>
<echo>Created XWords4-debug-${git-rev}.apk</echo>
</then>
</if>
</target>
</project>