mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-09 22:00:39 +01:00
include hash of current R.java in xlation update json, not of the entire app
This commit is contained in:
parent
a3bcef18f0
commit
d91c307792
2 changed files with 5 additions and 9 deletions
|
@ -74,7 +74,7 @@ public class UpdateCheckReceiver extends BroadcastReceiver {
|
||||||
private static final String k_PARAMS = "params";
|
private static final String k_PARAMS = "params";
|
||||||
private static final String k_DEVID = "did";
|
private static final String k_DEVID = "did";
|
||||||
private static final String k_XLATEINFO = "xlatinfo";
|
private static final String k_XLATEINFO = "xlatinfo";
|
||||||
private static final String k_APPGITREV = "apprev";
|
private static final String k_STRINGSHASH = "strings";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReceive( Context context, Intent intent )
|
public void onReceive( Context context, Intent intent )
|
||||||
|
@ -181,7 +181,7 @@ public class UpdateCheckReceiver extends BroadcastReceiver {
|
||||||
|
|
||||||
if ( 0 < params.length() ) {
|
if ( 0 < params.length() ) {
|
||||||
try {
|
try {
|
||||||
params.put( k_APPGITREV, BuildConstants.GIT_HASH );
|
params.put( k_STRINGSHASH, BuildConstants.STRINGS_HASH );
|
||||||
params.put( k_NAME, packageName );
|
params.put( k_NAME, packageName );
|
||||||
params.put( k_AVERS, versionCode );
|
params.put( k_AVERS, versionCode );
|
||||||
DbgUtils.logf( "current update: %s", params.toString() );
|
DbgUtils.logf( "current update: %s", params.toString() );
|
||||||
|
|
|
@ -19,11 +19,7 @@ cd $(dirname $0)
|
||||||
cd ../
|
cd ../
|
||||||
|
|
||||||
GITVERSION=$(../scripts/gitversion.sh)
|
GITVERSION=$(../scripts/gitversion.sh)
|
||||||
if git rev-parse $GITVERSION 2>/dev/null 1>/dev/null; then
|
STRINGS_HASH=$(git log -- ${BUILD_DIR}/archive/R.java | grep '^commit ' | head -n 1 | awk '{print $2}')
|
||||||
GIT_HASH=$(git rev-parse $GITVERSION)
|
|
||||||
else
|
|
||||||
GIT_HASH=unknown
|
|
||||||
fi
|
|
||||||
|
|
||||||
# TODO: deal with case where there's no hash available -- exported
|
# TODO: deal with case where there's no hash available -- exported
|
||||||
# code maybe? Better: gitversion.sh does that.
|
# code maybe? Better: gitversion.sh does that.
|
||||||
|
@ -42,11 +38,11 @@ EOF
|
||||||
SHORTVERS="$(git describe --always $GITVERSION 2>/dev/null || echo unknown)"
|
SHORTVERS="$(git describe --always $GITVERSION 2>/dev/null || echo unknown)"
|
||||||
|
|
||||||
cat <<EOF > ${BUILD_DIR}/src/org/eehouse/android/${VARIANT}/BuildConstants.java
|
cat <<EOF > ${BUILD_DIR}/src/org/eehouse/android/${VARIANT}/BuildConstants.java
|
||||||
// auto-generated; do not edit
|
// auto-generated (by $(basename $0)); do not edit
|
||||||
package org.eehouse.android.${VARIANT};
|
package org.eehouse.android.${VARIANT};
|
||||||
class BuildConstants {
|
class BuildConstants {
|
||||||
public static final String GIT_REV = "$SHORTVERS";
|
public static final String GIT_REV = "$SHORTVERS";
|
||||||
public static final String GIT_HASH = "$GIT_HASH";
|
public static final String STRINGS_HASH = "$STRINGS_HASH";
|
||||||
public static final short CLIENT_VERS_RELAY = $CLIENT_VERS_RELAY;
|
public static final short CLIENT_VERS_RELAY = $CLIENT_VERS_RELAY;
|
||||||
public static final boolean CHAT_SUPPORTED = $CHAT_SUPPORTED;
|
public static final boolean CHAT_SUPPORTED = $CHAT_SUPPORTED;
|
||||||
public static final boolean THUMBNAIL_SUPPORTED = $THUMBNAIL_SUPPORTED;
|
public static final boolean THUMBNAIL_SUPPORTED = $THUMBNAIL_SUPPORTED;
|
||||||
|
|
Loading…
Add table
Reference in a new issue