diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/UpdateCheckReceiver.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/UpdateCheckReceiver.java index c3c4e2cfd..e580212a7 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/UpdateCheckReceiver.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/UpdateCheckReceiver.java @@ -64,6 +64,7 @@ public class UpdateCheckReceiver extends BroadcastReceiver { private static final String k_NAME = "name"; private static final String k_AVERS = "avers"; private static final String k_GVERS = "gvers"; + private static final String k_GHASH = "ghash"; private static final String k_INSTALLER = "installer"; private static final String k_DEVOK = "devOK"; private static final String k_APP = "app"; @@ -143,6 +144,7 @@ public class UpdateCheckReceiver extends BroadcastReceiver { appParams.put( k_AVERS, versionCode ); appParams.put( k_GVERS, BuildConstants.GIT_REV ); + appParams.put( k_GHASH, BuildConstants.GIT_HASH ); appParams.put( k_INSTALLER, installer ); if ( devOK( context ) ) { appParams.put( k_DEVOK, true ); diff --git a/xwords4/android/scripts/genvers.sh b/xwords4/android/scripts/genvers.sh index 502a604b6..262b2d0e2 100755 --- a/xwords4/android/scripts/genvers.sh +++ b/xwords4/android/scripts/genvers.sh @@ -43,12 +43,14 @@ EOF # Eventually this should pick up a tag if we're at one. That'll be # the way to mark a release SHORTVERS="$(git describe --always $GITVERSION 2>/dev/null || echo ${GITVERSION}+)" +GITHASH=$(git rev-parse --verify HEAD) cat < ${BUILD_DIR}/src/org/eehouse/android/${VARIANT}/BuildConstants.java // auto-generated (by $(basename $0)); do not edit package org.eehouse.android.${VARIANT}; class BuildConstants { public static final String GIT_REV = "$SHORTVERS"; + public static final String GIT_HASH = "$GITHASH"; public static final String STRINGS_HASH = "$STRINGS_HASH"; public static final short CLIENT_VERS_RELAY = $CLIENT_VERS_RELAY; public static final boolean CHAT_SUPPORTED = $CHAT_SUPPORTED;