File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
src/main/java/org/passwordmaker/android Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ repositories {
18
18
/*
19
19
* Gets the version name from the latest Git tag
20
20
*
21
- * Tag each release like: git tag -a 1 .0
21
+ * Tag each release like: git tag -a v1 .0
22
22
* then Rebuild for a nice version number
23
23
*
24
24
*/
@@ -41,11 +41,19 @@ def generateVersionCode = { ->
41
41
it. padLeft(2 , " 0" )
42
42
}. join(" " )
43
43
if ( versions. size() >= 2 && versions[1 ]. isNumber() ) {
44
+ // This is off of a release tag: '2.0.5' but has a couple of commits since: 2.0.5-4-g6af5805 we want the code to have '04' in this case.
44
45
code + = versions[1 ]. padLeft(2 , " 0" )
45
46
} else if ( versions. size() >= 3 && versions[2 ]. isNumber() ) {
47
+ // This has a '-qualifier-##' e.g. '2.0.5-SNAPSHOT-1-g6af5805' we want the code to have '01' appended in this case.
46
48
code + = versions[2 ]. padLeft(2 , " 0" )
47
- } else {
49
+ } else if ( versions[-1 ] == " SNAPSHOT" ) {
50
+ // The first snapshot
48
51
code + = " 00"
52
+ } else {
53
+ // This is if we are on the release tag itself, lets force this to be the end of the revisions
54
+ // example: '2.0.5' as the tag, we want to add 99 to the end, so that any revisions handed out during testing will be
55
+ // less than this revision.
56
+ code + = " 99"
49
57
}
50
58
return code. toInteger()
51
59
}
Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ protected void onResume() {
108
108
showUsernameBasedOnPreference ();
109
109
showPassStrengthBasedOnPreference ();
110
110
favoritesAdapter .notifyDataSetChanged ();
111
+ updateSelectedProfileText ();
111
112
}
112
113
113
114
@ Override
@@ -272,6 +273,8 @@ protected void updateSelectedProfileText() {
272
273
if ( btnClearSelectedProfile .getVisibility () != View .VISIBLE )
273
274
btnClearSelectedProfile .setVisibility (View .VISIBLE );
274
275
}
276
+ if ( ! text .getText ().toString ().equals (value ) )
277
+ Log .i (LOG_TAG , "Updated selected profile to be: \" " + value + "\" " );
275
278
text .setText (value );
276
279
}
277
280
You can’t perform that action at this time.
0 commit comments