Skip to content

Commit

Permalink
Show git hash in dev builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jclehner committed Nov 14, 2013
1 parent 4da9f16 commit 5b77a22
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/main/res/values/version.xml ident
4 changes: 2 additions & 2 deletions src/main/java/at/jclehner/rxdroid/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ private static synchronized void init()
{
final Context c = RxDroid.getContext();
sVersion = c.getString(R.string.version);
sRevision = c.getString(R.string.vcs_revision);
sRevision = c.getString(R.string.git_hash);
sAppName = c.getString(R.string.app_name);

final StringTokenizer st = new StringTokenizer(sRevision);
if(st.countTokens() != 3)
return;

st.nextToken(); // discard
sRevision = st.nextToken();
sRevision = st.nextToken().substring(0, 8);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/res/values/version.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<resources>
<item type="string" name="app_name">RxDroid</item>
<item type="string" name="version">0.9.20</item>
<item type="string" name="vcs_revision">$Revision$</item>
<item type="string" name="git_hash">$Id$</item>

<item type="string" name="_msg_no_translation">RxDroid has not yet been translated to your language. If you want
to help translating this app into %1$s, please contact me! Contact details can be found under "Preferences".
Expand Down

0 comments on commit 5b77a22

Please sign in to comment.