generate sender_id const from ENV so doesn't need to be checked in.

Now works to register as I'm using the right id.
This commit is contained in:
Eric House 2012-10-16 08:16:43 -07:00
parent be79ce77ee
commit 50238bea3e
2 changed files with 19 additions and 0 deletions

View file

@ -79,6 +79,9 @@
<arg value="--dest-dir"/>
<arg value="./assets"/>
</exec>
<exec dir="." executable="../scripts/gen_gcmid.sh"
output="src/org/eehouse/android/xw4gcm/GCMConsts.java"
/>
<exec dir="." executable="../scripts/ndkbuild.sh" output="/dev/null">
<arg value="-j3"/>
</exec>

View file

@ -0,0 +1,16 @@
#!/bin/sh
if [ -z "$GCM_SENDER_ID" ]; then
echo "GCM_SENDER_ID not in env"
exit 1
fi
cat <<EOF
// Auto-generated: DO NOT CHECK THIS IN until questions about
// obscuring the id are cleared up
package org.eehouse.android.xw4gcm;
public class GCMConsts {
public static final String SENDER_ID = "${GCM_SENDER_ID}";
}
EOF